Using POST-vars form Connectivity in ChronoForms

rmesman 07 Mar, 2009
Hi,

It seems simple and maybe the answer is already in some post, but I here it is :

I'm using a ChronoConnectivity-form which shows a list of jobs to apply for. When someone wants to apply for a job I'm calling the apply-form with this link:
<a href="index.php?option=com_chronocontact&chronoformname=lincasol&vac_naam={vac_naam}&vac_nr={vac_nr}" target="_blank">


I need both 'vac_naam' and 'vac_nr' in my apply-form.I try to read them in the aplly-form with this:

<INPUT TYPE="hidden" NAME="vac_nr" VALUE="<?php $_POST['vac_nr']  ?>" >
<input name="vac_naam" id="vac_naam" type="text" value="<?php $_POST['vac_naam'] ?>" /></td>


I'm not sure if this the right way but anyway, no value(s) show up in the form. What am I doing wrong?

Thanks,
Robin
nml375 07 Mar, 2009
Since these variables are entered into the url, you'll have to use $_GET['vac_nr'] and $_GET['vac_nr'] to retrieve them.
You could also use the JRequest::getVar() method.
<INPUT TYPE="hidden" NAME="vac_nr" VALUE="<?php echo(JRequest::getVar('vac_nr', '', 'GET'));  ?>" >
<input name="vac_naam" id="vac_naam" type="text" value="<?php echo(JRequest::getVar('vac_naam', '', 'GET')); ?>" /></td>
rmesman 08 Mar, 2009
Thanks! works prefectly!
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger