-3
I have a difficulty in Select which is to use Value to complement a link and Select to Input. This is the Select code, as you can see I used Onchange to bring Value to the link:
<select class="div-select" name="cidade" id="cidade" onchange="redirect_to.value=redirect_original.value+this.value" required>
<option disabled selected>Selecione uma cidade</option><!--Opção em branco-->
<option value="123456789">Guarapuava-PR</option>
<option value="123456789">Guiratinga-MT</option>
<option value="123456789">Igrejinha-RS</option>
<option value="123456789">Joinville-SC</option>
<option value="123456789">Lajeado-RS</option>
<option value="123456789">Otacílio Costa-SC</option>
<option value="123456789">Panambi-RS</option>
<option value="123456789">Pinhão-PR</option>
<option value="123456789">Ponta Grossa-PR</option>
<option value="123456789">Quedas do Iguaçu-PR</option>
<option value="123456789">Santa Cruz do Sul-RS</option>
<option value="123456789">Santa Maria-RS</option>
<option value="123456789">Santo Ângelo-RS</option>
<option value="123456789">São Fidélis-RJ</option>
<option value="123456789">Teixeira de Freitas-BA</option>
<option value="123456789">Xanxerê-SC</option>
</select>
And this is the code that redirects to open the Whatsapp link:
<input id="redirect_original" type='hidden' name='redirect_original' value='https://api.whatsapp.com/send?text=Ol%C3%A1%2C%20tenho%20interesse%20no%20curso%20de%20<?php echo $_GET['curso']; ?>.&phone=55' disabled/>
<input id="redirect_to" type='hidden' name='redirect_to' value='https://api.whatsapp.com/send?text=Ol%C3%A1%2C%20tenho%20interesse%20no%20curso%20de%20<?php echo $_GET['curso']; ?>.&phone=55' />
How can I put Value on the redirect link to open Whatsapp and the Option text for the Input from the City field?
I didn’t get it right, you want the value of which element and what is the destination of that value? and how do you select it for an input?
– NoFace
The inputs "redirect_original" and "redirect_to" they redirect the page, I’m looking for a way to bring the value of select to this input and what is written in the send option in the form action.
– Leonardo
And this form would be where? Would it be select only? Only inputs ? or all? Type inside the Forms would be select and inputs? Pq you did not put Forms there in the code
– NoFace