I searched the forum but my english isnt good enough to know the right search termes. Heres is what i want to achieve:
I have one main contact form with a dropdown which selects the recipients emails. It is like this:
Depending the Users choice in the dropdown, the recipients email is used. This is working perfectly.
Now i want to link to my Form from 3 different articles and choose the right option in the select dropdown automaticly via the link. Is that possible with a link like that?
I have one main contact form with a dropdown which selects the recipients emails. It is like this:
<p>You want...</p>
<select name="recipients">
<option value="email01">to Bla Bla Bla</option>
<option value="email02">to second Bla Bla Bla</option>
<option value="email03">to another Bla Bla Bla</option>
</select>
Depending the Users choice in the dropdown, the recipients email is used. This is working perfectly.
Now i want to link to my Form from 3 different articles and choose the right option in the select dropdown automaticly via the link. Is that possible with a link like that?
index.php?option=com_chronocontact&chronoformname=myform?recipients=email02
Hi,
the link should be:
I changed the ? to & and you also need a small js or php snippet to select the passed value!
Max
the link should be:
index.php?option=com_chronocontact&chronoformname=myform&recipients=email02
I changed the ? to & and you also need a small js or php snippet to select the passed value!
Max
Hello,
I have a similar problem. The thing is I want to pass variables to a form through a menu. The thing is, the link field in the menu item field is not editable for chronoforms/connectivity.. Is there a correct way to do this? Thanks in advance.
I have a similar problem. The thing is I want to pass variables to a form through a menu. The thing is, the link field in the menu item field is not editable for chronoforms/connectivity.. Is there a correct way to do this? Thanks in advance.
Hi, try to make a menu item of type URL or link not of type Chronoforms!
Max
Max
Thanks for the quick reply. Done that already. My problem is i need to pass a variable to the URL. It works fine if I hard code the value. My menu link looks something like this...
index.php?option=com_chronoconnectivity&connectionname=election_event_connectivity&task=editrecord&cids=&Itemid=9
I want the cids parameter to contain a variable specifically an ID of a record from another form. Is this possible?
Thanks again.
index.php?option=com_chronoconnectivity&connectionname=election_event_connectivity&task=editrecord&cids=&Itemid=9
I want the cids parameter to contain a variable specifically an ID of a record from another form. Is this possible?
Thanks again.
you also need a small js or php snippet to select the passed value!
Can somebody provide this snippet to get the value from the URL an select it in the form?
Thanks for the quick reply. Done that already. My problem is i need to pass a variable to the URL. It works fine if I hard code the value. My menu link looks something like this...
index.php?option=com_chronoconnectivity&connectionname=election_event_connectivity&task=editrecord&cids=&Itemid=9
I want the cids parameter to contain a variable specifically an ID of a record from another form. Is this possible?
Thanks again.
if you want to get it from another form then you need to redirect from another form!
use this code in the onSubmit after email box of the first form:
<?php
$MyForm->formrow->redirecturl = 'index.php?option=com_chronoconnectivity&connectionname=election_event_connectivity&task=editrecord&cids='.$_POST['field_name'].'&Itemid=9';
?>
@yuberlin, does this answer your question too ?
Regards
Max
Can I place this in the link field of a Menu Item? thanks again.
<?php
$MyForm->formrow->redirecturl = 'index.php?option=com_chronoconnectivity&connectionname=election_event_connectivity&task=editrecord&cids='.$_POST['field_name'].'&Itemid=9';
?>
Hi Waling,
no, of course this is not possible, this needs to be where I mentioned!
Max
no, of course this is not possible, this needs to be where I mentioned!
Max
Hey Max, I have a similar situation, except that instead of passing variables to another forms, I just need the next page to use the form variables to confirm which information was entered and to generate a link to another page, which needs these variable to generate a FedEx label.
I Was using the whole code on the "On Submit code - after sending email:" section without a problem, but the customer requested me to remove some of the modules on the confirmation page, so I needed to make it a menu item so I could control what appears and what doesn't.
Now I was using the Redirect URL and it goes to the page without a problem, but the PHP code is not retrieving the variables from the form. (BTW, I'm using Sourcerer to be able to include PHP code within an article content)
Based on the replies from this post, all I need to do is go back to use the "On Submit code - after sending email:" section, right?
I Was using the whole code on the "On Submit code - after sending email:" section without a problem, but the customer requested me to remove some of the modules on the confirmation page, so I needed to make it a menu item so I could control what appears and what doesn't.
Now I was using the Redirect URL and it goes to the page without a problem, but the PHP code is not retrieving the variables from the form. (BTW, I'm using Sourcerer to be able to include PHP code within an article content)
Based on the replies from this post, all I need to do is go back to use the "On Submit code - after sending email:" section, right?
Also, I think I'm having a problem with my syntax here. I need to add multiple variables, but it doesn't seem to like the code:
Does anyone see a mistake here?
<?php
$MyForm->formrow->redirecturl = 'index.php?option=com_content&view=article&id=16?first_name='.$_POST['first_name']&last_name='.$_POST['last_name'];
?>
Does anyone see a mistake here?
Hi lelias,
I have no idea what Sourcere is or what is does . . . ChronoForms is completly capable of showing PHP inside an article - just add the PHP to the Form HTML of a new form and use the CF Plugin.
You have mixed up quotes in your PHP too. Try
Bob
I have no idea what Sourcere is or what is does . . . ChronoForms is completly capable of showing PHP inside an article - just add the PHP to the Form HTML of a new form and use the CF Plugin.
You have mixed up quotes in your PHP too. Try
<?php
$MyForm->formrow->redirecturl = "index.php?option=com_content&view=article&id=16?first_name=".$_POST['first_name']."&last_name=".$_POST['last_name'];
?>
Bob
Hi Bob,
I am not trying to transfer the variables to another form, but to a thank you page.
I had the PHP working fine, but my client doesn't want the form to show up on the thank you page. Since the form is on the User1 position, my logic was to create a menu item pointing to an article with the thank you page. This way I can set up the module not to show on that page.
The only problem I'm facing here is passing multiple variables on the URL. The code Max gave works fine with one variable, but when I try to add more it simply defaults to the form's POST URL.
I tried the code you supplied and it didn't work either.
Luciano
I am not trying to transfer the variables to another form, but to a thank you page.
I had the PHP working fine, but my client doesn't want the form to show up on the thank you page. Since the form is on the User1 position, my logic was to create a menu item pointing to an article with the thank you page. This way I can set up the module not to show on that page.
The only problem I'm facing here is passing multiple variables on the URL. The code Max gave works fine with one variable, but when I try to add more it simply defaults to the form's POST URL.
I tried the code you supplied and it didn't work either.
Luciano
This topic is locked and no more replies can be posted.