This topic is locked
[SOLVED]

 Auto fill form from the URL

3/29/2010 1:41:54 AM
PHPRunner General questions
I
indigo author

Hi,
I am creating a referral form and have a field "referredby".

Now I want to accomplish the following.

  1. Whenever a suer clicks on a link which has "?referredby=abc", the field should automatically be filled by the text "abc"
  2. If I can make it read-only so it cant be changed and hide the field from displaying, thats even better.
    Is this possible?

    Then I can also use it for a referral program.

J
Jane 4/2/2010

Hi,
you can check this parameter in the Before process event on the Eventstab and save it in the session variable:

if (@$_REQUEST["referredby"])

$_SESSION["referredby"] = $_REQUEST["referredby"];


Then use $_SESSION["referredby"] as default value on the "Edit as" settings dialog on the Visual Editor tab.