Forums

Event's

Vipz 18 Jan, 2016
Sorry my bad English , I use the translator.
And I'm noob in programming.

If you have chosen in dropdown - value (1) and clicked the submit button should automatically be sent here such form:


<form method="POST" action="URL"> 
    <input type="hidden" name="receiver" value="Number> 
    <input type="hidden" name="targets" value="{name}"> 
    <input type="hidden" name="sum" value="1" data-type="number">  
    <input type="hidden" name="paymentType" value="AC">
</form>


If you have chosen in dropdown - value (2) and clicked the submit button should automatically be sent here such form:


<form method="POST" action="URL"> 
    <input type="hidden" name="receiver" value="Number> 
    <input type="hidden" name="targets" value="{name}"> 
    <input type="hidden" name="sum" value="1" data-type="number">  
    <input type="hidden" name="Type" value="PC">
</form>


Thank you in advance for your help. I'll fix everything I insist on paying you for buy key.
GreyHead 18 Jan, 2016
1 Likes
HI Vipz,

If you give your dropdown the name Type and set the options like this
PC=PC
AC=AC
that should do what you have posted here

Bob
Vipz 18 Jan, 2016
Please leave a comment

Maybe I have something not properly explained.

I have a basic form number 1.

If I select in dropdown (A)

And then click (Submit)

Should be triggered automatically form number 2

<form method="POST" action="URL1"> 
    <input type="hidden" name="receiver" value="Number> 
    <input type="hidden" name="targets" value="{name}"> 
    <input type="hidden" name="sum" value="1" data-type="number">  
    <input type="hidden" name="paymentType" value="AC">
</form>


If I select in dropdown (B)

And then click (Submit)

Should automatically go to the form room 3

<form method="POST" action="URL2"> 
    <input type="hidden" name="receiver" value="Number> 
    <input type="hidden" name="targets" value="{name}"> 
    <input type="hidden" name="sum" value="1" data-type="number">  
    <input type="hidden" name="Type" value="PC">
</form>
GreyHead 18 Jan, 2016
HI Vipz,

You could do that in a Custom Code action in the form ON Submit event
<?php
switch ( $form->data['dropdown_name'] ) {
  case 'A':
   $url = 'this url';
   $type = 'AC';
   break;
  case 'B':
   $url = 'that url';
   $type = 'PC';
   break;
}
?>
<form method="POST" action="<?php echo $url; ?>"> 
    <input type="hidden" name="receiver" value="Number> 
    <input type="hidden" name="targets" value="{name}"> 
    <input type="hidden" name="sum" value="1" data-type="number">  
    <input type="hidden" name="Type" value="<?php echo $type; ?>">
</form>

But your form has no submit button so you would need to auto submit.

Bob
Vipz 18 Jan, 2016
Thank you.
But I can't do it.

Can you ?

If you choose text 1 in the dropdown , and clicked send to work , all will go then and work the event 1-1.

If you choose 2 in the dropdown , and clicked send to work , all will go then and work event 1-2.

See the image

Dropdown


Events
This topic is locked and no more replies can be posted.