Same hidden field, different values
-
I’m trying to add a hidden field that gets different values depending on options on the form, but the uploaded content is stored with always the same value, the last one.
Something like this:
[hidden email-do-servico “”]
[group cc-informatica-pc][hidden email-do-servico “[email protected]”][/group]
[group cc-informatica-impressoras][hidden email-do-servico “[email protected]”][/group]
[group cc-outros-equipamentos-a-reparar][hidden email-do-servico “[email protected]”][/group]
[group cc-apetrechamento-cantina][hidden email-do-servico “[email protected]”][/group]
[group cc-apetrechamento-informatica][hidden email-do-servico “[email protected]”][/group]and
show [cc-informatica-pc] if [informatica-equipamentos] equals “Computadores”
show [cc-informatica-impressoras] if [informatica-equipamentos] equals “Impressoras”
show [cc-outros-equipamentos-a-reparar] if [equipamentos-que-necessitam-reparacao] not equals “Informática”
show [cc-apetrechamento-cantina] if [que-equipamentos-necessita] equals “Cantina”
show [cc-apetrechamento-informatica] if [que-equipamentos-necessita] equals “Informática”I need the field email-do-servico to assume one of the possible options above, or be empty if anything else. What happens is that, maybe because is the same field name, what is stored in the wp_postmeta values, meta_key _field_email-do-servico is always the last one (in this example, [email protected]), no matter what option is selected by the user.
Is it possible to do this?
By the way, I also use this strategy to put the email in the CC, and it works great, but I also need the right email in the postmeta value.
Nelson
- The topic ‘Same hidden field, different values’ is closed to new replies.