I need to send a parameter when calling a chronoforms form to fill a field that will be sent with the rest of the input data.
the form is a subscription sheet for events, every event will call the form with de event id as parameter
Could anybody help me?
Thanks in advance
Arturo
the form is a subscription sheet for events, every event will call the form with de event id as parameter
Could anybody help me?
Thanks in advance
Arturo
Hi Arturo,
this is your form link:
index.php?option=com_chronocontact&chronoformname=formname
make it :
index.php?option=com_chronocontact&chronoformname=formname&eventid=44343
now ate your form code:
cheers
Max
this is your form link:
index.php?option=com_chronocontact&chronoformname=formname
make it :
index.php?option=com_chronocontact&chronoformname=formname&eventid=44343
now ate your form code:
<?php
echo JRequest::getVar('eventid');
?>
cheers
Max
Thank very much Max, this is a very urgent problem in my customer installation and i am a newbie
One more question: How can i send this value with the rest of the input fields?
Thanks again, max
One more question: How can i send this value with the rest of the input fields?
Thanks again, max
you can put it in the value or a hidden input field!
Cheers
Cheers
Hello,
could you please be more specific where to put your Code
and how to fill in the information in a given input field?
Thanks in advance
Best regards
Christian
could you please be more specific where to put your Code
Code: Select all
<?php
echo JRequest::getVar('eventid');
?>
and how to fill in the information in a given input field?
Thanks in advance
Best regards
Christian
Hi Morymmus,
I'm not completely clear what you want to do here. To get a parameter value from the URL and show it in an input you need something like this in the Form HTML
Bob
PS The isSite() line is not needed in the latest release of ChronoForms
I'm not completely clear what you want to do here. To get a parameter value from the URL and show it in an input you need something like this in the Form HTML
<?php
if ( !$mainframe->isSite() ) { return; }
$eventid = JRequest::getInt('eventid', 0, 'get');
?>
. . .
<input name='eventid' id='eventid' type='text' value='<?php echo $eventid; ?>' />
Bob
PS The isSite() line is not needed in the latest release of ChronoForms
Hi,
Here is my plan:
I created a table with technical data for 5 Items. For every Item there is a link to call the form I created. With clicking on this link I want to fill in a specified field with data.
I don't need dynamic grabbing.
To give you an idea I was expecting something like this:
index.php?option=com_chronocontact&chronoformname=<<Name_of_the_Form>>&<<fieldname_in_the_form>>=<<Data_to put_in_the_field>>
I hope this is an answer to your question what I want to do.
Grabbing a paramter from the URL will work as well, I think. I will try this next.
Are there any restrictions to the Data grabbed from the URL? Like lowercase only, or no spaces?
Thanks again for your fast response and your help
Best regards
Christian
Here is my plan:
I created a table with technical data for 5 Items. For every Item there is a link to call the form I created. With clicking on this link I want to fill in a specified field with data.
I don't need dynamic grabbing.
To give you an idea I was expecting something like this:
index.php?option=com_chronocontact&chronoformname=<<Name_of_the_Form>>&<<fieldname_in_the_form>>=<<Data_to put_in_the_field>>
I hope this is an answer to your question what I want to do.
Grabbing a paramter from the URL will work as well, I think. I will try this next.
Are there any restrictions to the Data grabbed from the URL? Like lowercase only, or no spaces?
Thanks again for your fast response and your help
Best regards
Christian
Hi Morrmmus,
Bob
With clicking on this link I want to fill in a specified field with data.
That is the code I've just posted for you.Are there any restrictions to the Data grabbed from the URL? Like lowercase only, or no spaces?
If you want to include spaces or special characters then the value must be urlencoded.Bob
This topic is locked and no more replies can be posted.