how to pass parameters to a form?

ocuba 03 Dec, 2009
There is a link httt: / / mysaite.com / file.php? Name1 = 23 & prise1 = 54 & name2 = 23 & prise2 = 54 &...$ nameN = 23 & priseN = 54) how to pass parameters to a form?
ocuba 04 Dec, 2009
There is a form for orders based on the component of Chromoform. It has the following fill-in-the-blank fields: Product name, Price, Delivery address, e-mail. I want to clik on link in the product card to go to the form of Chromoform and through this link pass parametres(Product name, Price) to the form . How can it be accomplished?
nml375 04 Dec, 2009
Hi,
You could try to modify your form inputs by altering (or adding if not present) the value-property of each input;
Assume we have an input such as this:
<input type="text" name="Name1" value="" />

Change it into something like this:
<input type="text" name="Name1" value="<?php echo JRequest::getInt('Name1', 0, 'GET'); ?>" />

You'll have to change the 'Name1' to match the parameter from the URI. The JRequest::getInt() method will only return integers (numbers), if any of your parameters contain strings, you'll have to replace it with JRequest::getString().

/Fredrik
This topic is locked and no more replies can be posted.