Checkbox with input field

Home Forums Quform WordPress Checkbox with input field

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

    Hi together

    Before I start to pepper you with questions I would like to thank you for that great plugin.

    At the moment I try to create a donation form for a charity organization. Therefore I took the checkbox element (radio buttons) and predefined different donation amounts (e.g. $50, $100) as a third option I would like to create an input field where the donators should be able to enter their desired amount.

    Is it possible to creat such a field without a big knowledge in programming respectivly by means of a short explanation/guideline?

    If not, I tought to insert a simple textbox and connect the same with a logical rule to the checkbox elements third option “other amount”. The problem then would be to pass on the entered value to the checkbox element so that the value would be stored under the same attribute (e.g. ‘Donation amount’) as the predefined options ($50, $100).

    Thank you for ideas/approaches to solve the problem!

    Janosh

    PS I wondered a little that no one else had a similar question in the forum. Maybe I should start
    improving my programming knowledge 😉

    #8100
    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.

    #8134
    Carboxylase
    Participant

    Hi Ally
    Thank you for the quick answer.
    Unfortunately your suggested second step doesn’t work. The values from option three aren’t stored in the same database column as the values of option 1 and 2 ($50 and $100).
    How difficult would it be to code that? Maybe you could give me a few instructions how to to it. I think that some other form users could also be interested…
    Regards, Janosh

    #8189
    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.

    #8360
    Carboxylase
    Participant

    Hello Ally
    I followed your instructions and it works great! Thank you so much.
    There is one more little thing I would like to change: Would you be able to add an other codeline that delets the “other” field after its value has been passed on to the radio button element so that it isn’t going to show up in the database?
    If you don’t have time or the modification would cause a lot of work, leave it.
    I’m happy with your solution. Thank you again!
    Best regards, Janosh

    #8364
    Carboxylase
    Participant

    Hi
    Sorry, in the meantime I figured out how “delet” the field:
    You just have to select “Don’t save value in database.” in the field options.
    Thank you for the support, my problem is solved.
    Regards, Janosh

    #9339
    Carboxylase
    Participant

    Hi, sorry for reopening that topic,
    but I remarked an issue with the solution above:
    The code also passes on empty values, what shouldn’t happen because it means that one of the predefined donation options has been overwritten.
    Tried to modify the code so that it only passes on the “other” fields value if it isn’t empty, without success. Had problems with isset(…). Could you help me once more?
    Thanks.

    #9369
    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.

    #9387
    Carboxylase
    Participant

    Thank you Ally
    It’s working fine now!!!

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