TOPIC:

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #220959

  • Topic Author
  • seppi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 69
  • Thanks: 1
yes I know, witch one, it's the "user name". This field is not appearing, if I choose the no registration option, and - of course - it's not relevant as well.

I hoped, we would "override" all those irrelevants information (the password fields as well) with use of the the if statement.

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

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #220966

  • marinkosevo's Avatar
  • marinkosevo
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 747
  • Karma: 27
  • Thanks: 92
Yes, but that can't be done, the fields will always exist, but they will be hidden if we choose not to register. The solution is to edit the validation of username, you need to set it to custom, and one of the conditions should be the value of radio button.
You would need to set the username to be required, but if the radio button value is (the ones that do not require registration) then the field is not required. I hope you understand this.

Best regards,
Marinko

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

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #221017

  • Topic Author
  • seppi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 69
  • Thanks: 1
Hi Marinko

okay, I think I understand this - at least theoretically. But unfortunately I have no idea how I can change the validation automatically. Right now, the validation of "username" is set to "library" and "ff_valuenotempty".

Can you please give me a hint, how my custom validation of the user field should look like and how I can switch the validation type via script?

thank you!

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

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #221033

  • marinkosevo's Avatar
  • marinkosevo
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 747
  • Karma: 27
  • Thanks: 92
First, line in your code:
if(ff_getSubmit('mitgliedschaft') != 'goennermitglied' || ff_getSubmit('passivmitglied') != 'forumuser')
has to be both times mitgliedschaft.
Then, the example of custom validation is:
function ff_username_validation(element, message)
{
    if (element.value == '') {
if(jQuery('#goennermitglied').is(':checked')  || jQuery('#passivmitglied').is(':checked')){
return '';
}
else
        if (message=='') message = element.name+" faild in my test.\n"
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_username_validation

You need to create framework for exactly your field, so it won't be 'function ff_username_validation', but your name. Also, you need to find ID of the radio buttons and put that instead of #goennermitglied you need to put ID of the radio button, and for the second option also.

Best regards,
Marinko

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

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #221038

  • Topic Author
  • seppi
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 69
  • Thanks: 1
Hey Marinko

thanks a lot - well, I think I'm getting closer... but it's not working yet (same message), because I probably don't get the ID thing:

My field, where I want to set the custom condition framework is called 'username' indeed, so I though I could stick to your name ff_username_validation, correct?

My radio button group is called 'mitgliedschaft' and there, the two options, that have to call my own validation framework ff_username_validation are called 'passivmitglied' and 'goennermitglied'.

Something must be still missing now in my code (where do I call the field "mitgliedschaft" exactly?)
function ff_username_validation(element, message)
{
    if (element.value == '') {
if(jQuery('#goennermitglied').is(':checked')  || jQuery('#passivmitglied').is(':checked')){
return '';
}
else
        if (message=='') message = element.name+" faild in my test.\n"
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_username_validation

thanks again

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

Breezingforms Joomla! registration form / optional account creation 2 years 5 months ago #221039

  • marinkosevo's Avatar
  • marinkosevo
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 747
  • Karma: 27
  • Thanks: 92
Nope, your id is checked by right click on that button, and inspect element. There you will see an ID. Do that for both elements and put them in function, will probably look something like ff_elem1231.

Best regards,
Marinko

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

Moderators: ForumSupport
Time to create page: 0.053 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!