Breezingforms Joomla! registration form / optional account creation

  • seppi
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 1

seppi replied the topic: Breezingforms Joomla! registration form / optional account creation

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.
#220959
  • Posts: 747
  • Karma: 27
  • Thank you received: 92

marinkosevo replied the topic: Breezingforms Joomla! registration form / optional account creation

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
#220966
  • seppi
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 1

seppi replied the topic: Breezingforms Joomla! registration form / optional account creation

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!
#221017
  • Posts: 747
  • Karma: 27
  • Thank you received: 92

marinkosevo replied the topic: Breezingforms Joomla! registration form / optional account creation

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
#221033
  • seppi
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 1

seppi replied the topic: Breezingforms Joomla! registration form / optional account creation

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
#221038
  • Posts: 747
  • Karma: 27
  • Thank you received: 92

marinkosevo replied the topic: Breezingforms Joomla! registration form / optional account creation

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
#221039
Moderators: ForumSupporttomeperica
Time to create page: 0.109 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here