IF…ELSE Checkbox and Hidden Field

Home Forums Quform WordPress IF…ELSE Checkbox and Hidden Field

This topic is: not resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9170
    Carboxylase
    Participant

    Hi together
    I’m not very good in PHP… so I have two questions:

    1. How can I define the values for not checked checkbox elements/options?
    2. How can I assgin a value to a hidden element/field depending on a variable for example post_id?
      E.g. IF post_id=500 THAN ‘formXY’ ELSEIF post_id=851 THAN ‘formYX’.

    Would be really thankful if somebody could explain me how to do that.

    #9176
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9183
    Carboxylase
    Participant

    Hi Ally
    Thank you for your quick reply!

    1. I set a custom value, but if the box isn’t ticked the value is empty. That’s what I want to change, save a specific value in the databse if the option isn’t ticked, e.g. “box not checked”.
    2. Thanks, solved – after a while. Wasn’t shure which expressions to replace with custom data
    3. I don’t want to abuse your support, so tell me if my questions go too far, but would be cool if you could help me again with my first question (elment id is “iphorm_3_4”; value if not checked should be “unchecked”).

    Thanks!

    #9199
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9338
    Carboxylase
    Participant

    Hi Ally
    In the meantime I tested your suggested solution:
    <input type="hidden" name="iphorm_3_4" value="unchecked" />
    It doesn’t work. Created a HTML element and and added the code above. As result the value “unchecked” was always saved in the database, even if the box/option was checked.
    What’s wrong? Why does that expression overwrite everything?
    Thank you for your help!

    #9368
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy