• Resolved cath_allen14

    (@cath_allen14)


    Hi,

    I have a dropdown field with 5 choices attached to them. Each choice has a different value associated to it. When I select one of the choices the value is submitted.

    In a hidden field, I would like to pull in the text of the choice that is selected
    but for the value of the selected choice to still be submitted.

    E.g. one choice is Square/Chamfer £25/m with a value of 25. I would like the Square/Chamfer £25/m to be in the hidden field and the value 25 to be submitted.

    Thanks in advance for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @cath_allen14

    The easier way:

    First in the DropDown field select the “Choice text” option for the “Value to submit” attribute in its settings.

    Assuming the DropDown field is for example, the fieldname5, insert a calculated field in the form, and tick the checkbox: “Hide Field From Public Page” in its settings, and enter as its equation simply the name of DropDown field, in this case: fieldname5

    Now the DropDown field would be submitting the text of the choice selected by the user, and the calculated field the corresponding value.

    Best regards.

    Thread Starter cath_allen14

    (@cath_allen14)

    Brilliant – thanks so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Take text value from a dropdown box’ is closed to new replies.