Please help with Dynamic Select and CF7_POST
-
Since my English is only rudimentary, I would like to apologize in advance for having to consult the Google translator.
Hello.
It’s been a long time since I used DTX for the first time and then only the “dynamictext” function. After a long time, I have now discovered the new possibilities of DTX and I am still enthusiastic about your work on this plugin.
But since I’m now building a contact form for the first time in years that includes a “subject selection” using a drop-down, I definitely need your help. Thank you in advance for your support.
Initial situation:
The contact form provides the visitor with 5 subject options from which they can select one using the drop-down. So far, so simple.
Objective:
In addition – and this is where DTX is used, there are 5 different buttons spread across the website (form action with method=”post”), which refer to the contact form and are intended to pre-select a specific subject in the drop-down.
My problem:
I’ve already searched through your knowledge base about “Dynamic Select” and tested various things, but to be honest, due to my lack of English knowledge, I only partially understand what it means and I can’t really get used to the form tag generator clear.
I tried the code below, but it only created an additional entry in the drop-down selection. I suspect that this is completely wrong and that some shortcode needs to be written into the functions.php, which unfortunately I have next to no idea about.
Code used for Dynamic Select:[dynamic_select* subject placeholder:Please select include_blank dtx_disable_blank "CF7_POST key='subject_name'" "Subject example 1" "Subject example 2" "Subject example 3" "Subject example 4" "Subject example 5"]
Code used for the Form action button:
<form action="https://example.com/contactform/" method="post">
<input type="hidden" name="subject_name" value="Subject example 3">
<button name="Kontakt" title="Kontakt aufnehmen">Kontakt aufnehmen</button>
</form>It would be great if you could help me here by giving me a functional example of how the code should look correctly and what needs to be written in the functions.php.
Thanks so much
Best regards
Werner
- You must be logged in to reply to this topic.