TOPIC:

Joomla registration with contentBuilder check pass 4 years 7 months ago #160338

  • Topic Author
  • jok111
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 25
  • Thanks: 0
Hi,
I saw the Tutorial: ContentBuilder Joomla! Registration And Profiles.
I did it by myself and everything is working fine.
But I have a little problem. I want to force the user to type in a password with a minimum length and if possible some extra character. (like within joomla registration) How can I do this with the contentBuilder?
Do you have any hint for me?

Thank and regards
Jochen

Please Log in or Create an account to join the conversation.

Joomla registration with contentBuilder check pass 4 years 7 months ago #160341

  • Tihomir's Avatar
  • Tihomir
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 3568
  • Karma: 87
  • Thanks: 288
Hello there,

at list of your elements you should go to password element ( column editable ) and then on the top of window ( editable ) you can see option and scripts. Go to the scripts and there's a place ( INIT JS) where you can add your custom JS script for special charactert or whatever you want to do at your element.

Also you can find in attachment an image how it should look like.

Let us know if that worked for you.

Kind regards
===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Regards
Tihomir
==========================================
+++ Purchase Professional Support: crosstec.org/en/support/purchase-additional-support.html +++
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by Tihomir.

Joomla registration with contentBuilder check pass 4 years 7 months ago #160350

  • Topic Author
  • jok111
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 25
  • Thanks: 0
Thank you very much for your answer.
Unfornutally I'm a beginner concerning JS. Do you have perhaps an example.
For example I want to check that the user has entered 8 characters.
KInd regards
Jochen

Please Log in or Create an account to join the conversation.

Joomla registration with contentBuilder check pass 4 years 7 months ago #160367

  • Topic Author
  • jok111
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 25
  • Thanks: 0
I think my question is not quite clear. Sure I can make such a check with JS.
My problem is that I do not know the interface to contentBuilder. Is it the same as
in Breezingforms (something like: ff_getElementByName('FELDNAME') ) or something else
to access an element. And how can I publish an error message for the form if the check went wrong.
(is there perhaps any Docu about that). Or is it better to use BreezingForms to realize a registration form?
Kind regards
Jochen

Please Log in or Create an account to join the conversation.

Joomla registration with contentBuilder check pass 4 years 7 months ago #160383

  • Tihomir's Avatar
  • Tihomir
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 3568
  • Karma: 87
  • Thanks: 288
Ok,

1) about the Breezing Forms:
in your element you can see a part for validation => go to the custom validation
There you can write the code , for example ( at least 10 characters )
function ff_nameOfElement_validation(element, message)
{
     if(element.value.length > 10)
     {
          return '';
     }
     return 'Please enter at least 10 characters';
}

well, unlike BF, Content Builder has no concept (yet) to do that, so you have to do something like this.

At your element you can see editable column, open it and on the top of the window you should see options and script. Go to the scripts and into Init Js put the code similar to this one:
var el = jQuery(contentbuilder._("elementname")).on('change', function(){
    if(jQuery(this).val().length < 11){
       jQuery(this).before('<div style="color:red">Please add at least 10 characters.</div>');
       contentbuilder.onSubmit( function() { return false; } )
    }
});

You should see red validation msg above the filed.

Also you can find in attachment simple form ( BreezingForm ) how it should look like.

Let us know if that worked for you.

Kind regards
===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Regards
Tihomir
==========================================
+++ Purchase Professional Support: crosstec.org/en/support/purchase-additional-support.html +++
Attachments:
The following user(s) said Thank You: jok111

Please Log in or Create an account to join the conversation.

Last edit: Post by Tihomir.

Joomla registration with contentBuilder check pass 4 years 7 months ago #160387

  • Topic Author
  • jok111
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 25
  • Thanks: 0
Thank you very much for that useful information.
One thing, after writting a wrong password I can see the red text above the field.
Is there a possibility do delete that red text again when the password is written ok after(perhaps
insied an else case)?

Kind regards
Jochen

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.075 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!