Hi,
its possible to put two different submit buttons, for example to have different redirect in submit action?
The data array after submit don't contain the id/name and value of buttons:
Button1
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua" value="0" data-selections="0" data-message="Please make a selection from the list">Submit 1</button>
Button2
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua" value="1" data-selections="0" data-message="Please make a selection from the list">Submit 2</button>
Thank you in advance for any suggestion
E.
its possible to put two different submit buttons, for example to have different redirect in submit action?
The data array after submit don't contain the id/name and value of buttons:
Button1
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua" value="0" data-selections="0" data-message="Please make a selection from the list">Submit 1</button>
Button2
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua" value="1" data-selections="0" data-message="Please make a selection from the list">Submit 2</button>
Thank you in advance for any suggestion
E.
you need different submit pages or different actions to be processed ?
Give them the same name, don't give them the same ID.
And yes, it works perfectly for me using two buttons with the same name but a different value
And yes, it works perfectly for me using two buttons with the same name but a different value
Hi,
thank you for your reply🙂
I've setup the two buttons
<button class="ui button green c2a secondary" type="submit" name="continua2" id="continua2" value="0" data-selections="0" data-message="Please make a selection from the list">Continua alla parte 2</button>
<button class="ui button green c2a secondary" type="submit" name="continua1" id="continua1" value="1" data-selections="0" data-message="Please make a selection from the list">Vai alla pagina di riepilogo</button>
But into the submit array I don't have the value:
Into the submit action the redirect page depending the button clicked
You can see the the form here:
https://sviluppo.comune.mezzago.mb.it/form/step-1
thank you for your reply🙂
I've setup the two buttons
<button class="ui button green c2a secondary" type="submit" name="continua2" id="continua2" value="0" data-selections="0" data-message="Please make a selection from the list">Continua alla parte 2</button>
<button class="ui button green c2a secondary" type="submit" name="continua1" id="continua1" value="1" data-selections="0" data-message="Please make a selection from the list">Vai alla pagina di riepilogo</button>
But into the submit array I don't have the value:
Array ( [_ga] => GA1.3.77742431.1590487916 [fmalertcookies] => true [_gid] => GA1.3.1867950077.1591631548 [fireshield] => i4jcmv0r6dgmkh9h6aakp51cuudlqhsneo6dijs9cajctrtmkbpcslru5089pdh7tg8tdgsb2io75tj9r1oqrjpid1sggeqrqk2g2jloehn0hnabklbbcjr4alk4iu9h8ueesglajiiv5kk3so1bkeup7dprpcf8mnojlt863a0npci0udjtl7lkq9nnd37i1jejcr9221cgeqpv9f74du1n5ho0gliqb8ero6ejnhba7fqq4bds8sbdke3188vujqus46ebse4ije60t8u8s90cosn36m0skqutm7cojquhokgkpt0g==== [04f4eda2ab28416e5404c669ca5e7c2e] => 4af4a8107f4853ca54d74629a01a5240 [1a5e57d26aa108604a20008b7ff5c0ac] => 60385df71259d0bb54647dfb73acb727 [__atuvc] => 140|22,691|23,407|24 [__atuvs] => 5ee07dea30cf5444004 [Itemid] => 999 [option] => com_chronoforms6 [view] => form [chronoform] => richiesta-trasporto-sociale-1 [event] => submit [richiedente_nome] => xxx [richiedente_cognome] => xxx [richiedente_sesso] => Uomo [richiedente_nascita_luogo] => Mondo [richiedente_nascita_data] => 14/03/1999 [richiedente_residente_indirizzo] => Via rimembranze [richiedente_residente_numero] => 17/18 [richiedente_residente_luogo] => Bologna [richiedente_cellulare] => 3284242528 [richiedente_telefono] => [richiedente_mail] => mauil@gmail.com [riferimento_aggiuntivo] => no [riferimento_nominativo] => [riferimento_parentela] => [riferimento_indirizzo] => [riferimento_telefono] => [riferimento_mail] => [g-recaptchav3-response] => 03AGdBq25NVJWK-QUbBKZ98WF7OXlsfOhy7D4g9U3oLQsxI0-8vjP0GyvM_dddq_GvEqAhM9pUOQucZC0ZX3bsS7pvzDLLkjCf8TmUwL70DxUZe13qwvI_ZJuI6VltXCQIN_DeW13TyyVWp6fydmDubV20P7VCoprmi7cBFM8KbXSRiLOkra55ngW9QhqlKKE27JJSPH0JeRMAntmXcVHSFPbiXnfP5a6EzM2NUkbrjEVMRn-MIQ1aqQLnLNPgDiHAFrqrNZEQyf0vpEzbE9qLFpaTHS_YQcZmLEiPNx2hV_Cm7249Y36IDJIY1xQI8dkcF6E6cLvRFy3K9APpFkE1W0xdYGRO5Vy-6ED3jxB5DHLiIdR2dNo-XiF72kVCCBHM0R3ZXYapeTnGMXY6CnzPJsVHAWLLTK0kEQ [_gat] => 1 )
Into the submit action the redirect page depending the button clicked
You can see the the form here:
https://sviluppo.comune.mezzago.mb.it/form/step-1
Keep the NAME the same. Have a different (or no) id
and make sure the button is inside the form that's being submitted . If it's outside of it the data won't be included.
Hi healyhatman,
I've update the buttons in this way but into the submit array don't appear nothing:
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua2" value="0" data-selections="0" data-message="Please make a selection from the list">Continua alla parte 2</button>
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua1" value="1" data-selections="0" data-message="Please make a selection from the list">Vai alla pagina di riepilogo</button>
I'll confirm you that the buttons are into the forms but don't appear into submit array.
I've update the buttons in this way but into the submit array don't appear nothing:
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua2" value="0" data-selections="0" data-message="Please make a selection from the list">Continua alla parte 2</button>
<button class="ui button green c2a secondary" type="submit" name="continua" id="continua1" value="1" data-selections="0" data-message="Please make a selection from the list">Vai alla pagina di riepilogo</button>
I'll confirm you that the buttons are into the forms but don't appear into submit array.
I'm not sure how or why you need 2 buttons for 2 different submit urls, please clarify this point and I will try to suggest something
Hi MaxI would like that the page showed after submit depending of the button cliccked (A or B)
And I need that in any case the form update the data.
I've tried to link one botton with a different action but don't get data update.
And I need that in any case the form update the data.
I've tried to link one botton with a different action but don't get data update.
please try to add the class "toolbar-button" to the buttons, and for each one of them add "data-url" attribute with a value of the target url you want the button to submit the data to.
does that work ?
The method suggested by healyhatman should work if the buttons are onside the form, I understand you are using Connectivity and so the buttons may be outside the form, can you check that with the browser "inspect node" feature ?
does that work ?
The method suggested by healyhatman should work if the buttons are onside the form, I understand you are using Connectivity and so the buttons may be outside the form, can you check that with the browser "inspect node" feature ?
Change them to toolbar buttons. For "List view name" use the name of the form area you're submitting. Put the {url:event_name} in the url (if you want).
This topic is locked and no more replies can be posted.