[résolu] hidden entrance and condition

  • beheliod
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0

beheliod created the topic: [résolu] hidden entrance and condition

Hello
I've 3 hidden entrance
My forms is connect with googledrive
Is it possible to have a condition on hidden entrance like this

if "p1q1" is "p1q1a"
> sommei = 1
> sommem = 0
> sommer = 0

if "p1q1" is "p1q1b"
> sommei = 0
> sommem = 1
> sommer = 0

if "p1q1" is "p1q1c"
> sommei = 0
> sommem = 0
> sommer = 1

Because currently although 2 of the three hidden entrance can not be in a visible section there is an automatic entry even though

Thank you very much to your help !
Best regards
#235867
  • Posts: 2483
  • Karma: 86
  • Thank you received: 335

mihaela replied the topic: hidden entrance and condition

Hello,

What kind of element is p1q1.

Here is how you can set values of fields sommei, sommem and sommei depending on value entered in the field "p1q1".

Go to Advanced properties of that "p1q1" element and in Actionscript section set Type to Custom and mark Change as Action.
In the code are below put the code similar to this:
function ff_p1q1_action(element, action) 
{
    if(element.value == "p1q1a") {
        ff_getElementByName('sommei').value = 1;
        ff_getElementByName('sommem').value = 0;
        ff_getElementByName('sommei').value = 0;
        }
    if(element.value == "p1q1b") {
        ff_getElementByName('sommei').value = 0;
        ff_getElementByName('sommem').value = 1;
        ff_getElementByName('sommei').value = 0;
        }
    if(element.value == "p1q1c") {
        ff_getElementByName('sommei').value = 0;
        ff_getElementByName('sommem').value = 0;
        ff_getElementByName('sommei').value = 1;
        }
} 
What this will do it it will take value from textfield named "p1q1" and set values of textields sommei, sommem and sommei depending on value entered in the field "p1q1".
The code is different if those are other types of elements.

Also, you've written the same element name "sommei" twice so I suppose that this is a typo so please correct that to make it work as you wanted.

If this isn't what you wanted to achieve please explain a bit more what you want to achieve.

Regards,

Mihaela
#235868
The following user(s) said Thank You: beheliod
  • beheliod
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 29
  • Thank you received: 0

beheliod replied the topic: hidden entrance and condition

Whooooo !
Finaly it's so easy ;)
Breezingforms is really a very good component to Joomla.
Thank you very much, all is OK
Best regards
#235890
  • Posts: 2483
  • Karma: 86
  • Thank you received: 335

mihaela replied the topic: hidden entrance and condition

Hello,

Great! I'm really glad I've helped and that this is what you wanted to achieve and that it is working as you wanted for your form. :)

Best regards,

Mihaela
#235899
Moderators: ForumSupporttomeperica
Time to create page: 0.069 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