I have a slideshow that allows a custom link for each photo, and each photo has an ID number. I want this link to open a simple form that includes this number, in the database and in the email sent out.
The form would include name, email, photo ID, comments, captcha, submit.
I have created many forms with your component, but have never tried to dynamically add a value. Is this possible, and if so can you please explain how or direct me to a tutorial?
Many Thanks for a great extension for Joomla!
The form would include name, email, photo ID, comments, captcha, submit.
I have created many forms with your component, but have never tried to dynamically add a value. Is this possible, and if so can you please explain how or direct me to a tutorial?
Many Thanks for a great extension for Joomla!
Hi Riceman,
I'm not completely sure I understand but if the id is in the url than you can add it to a hidden field like this:
Bob
Note: getInt assumes that it is an integer, use getString otherwise
I'm not completely sure I understand but if the id is in the url than you can add it to a hidden field like this:
<?php
$photo_id = JRequest::getInt('photo_id', '', 'get');
?>
<input type='hidden' name='photo_id' value='<?php echo $photo_id; ?>' />Bob
Note: getInt assumes that it is an integer, use getString otherwise
Thanks Bob,
Well actually the slideshow is AJAX driven, so the link for each slide is not in the url, but rather an href link embedded in each slide:
<a href="chronoform_page" target="_self" class="menu" title="123">ID #123</a>
-where chronoform_page is the targeted simple form I was discussing
-and title is the slide ID
There would be say 50-70 of these slides each with a unique ID. Is there a way to pass that ID to the chronoform?
I hope this is clearer. Thanks again.
Well actually the slideshow is AJAX driven, so the link for each slide is not in the url, but rather an href link embedded in each slide:
<a href="chronoform_page" target="_self" class="menu" title="123">ID #123</a>
-where chronoform_page is the targeted simple form I was discussing
-and title is the slide ID
There would be say 50-70 of these slides each with a unique ID. Is there a way to pass that ID to the chronoform?
I hope this is clearer. Thanks again.
Hi Riceman,
Yes, add the ref to the href link then get it in Chronoforms as a 'get' variable.
Bob
Yes, add the ref to the href link then get it in Chronoforms as a 'get' variable.
<a href="index.php?option=com_chronocontact&chronoformname=xxx&id=123" target="_self" class="menu" title="123">ID #123</a>Bob
Great!
I have never used a get variable....could you explain a little more please if you have the time, or point to a tutorial, existing thread. I will look myself in the threads...but don't have the time right now and wanted to respond before you sign off for the day. I am in Hawaii and its 9:30 am....
Thanks
I have never used a get variable....could you explain a little more please if you have the time, or point to a tutorial, existing thread. I will look myself in the threads...but don't have the time right now and wanted to respond before you sign off for the day. I am in Hawaii and its 9:30 am....
Thanks
Hi Riceman,
Just after midnight here
Just after midnight here
$var = JRequest::getVar('var_name', '', 'get');
This topic is locked and no more replies can be posted.
