How to pass value from non-Scriptcase page to Scriptcase form field

I have a non-Scriptcase page and on this page is a (url) link to a scriptcase form:

http://localhost/scriptcase/app/samples/form_boekingen/form_boekingen.php?id=-1

This parameter ?id=-1 causes the form to start in insert mode, so far so good. I want to pass additional parameters to be used as default values in some of the fields. Can’t get it to work.

I tried this:
http://localhost/scriptcase/app/samples/form_boekingen/form_boekingen.php?id=-1&par1=testvalue
I tried to make this url work by:

  • assigning a global [par1] to the field in the SC form (field-> defined + initial value)
  • assigning a global [par1] to the attribute value (attribute values -> fixed value)

Non of these work. The application starts okay, but the value of par1 is not written in the field…

Re: How to pass value from non-Scriptcase page to Scriptcase form field

I will have to look at this in a bit, but one thing you can check is the generated code that SC is pumping out. Since you are passing the params using the URL, the code in your SC form … where you are populating the field values.

You should see the code something like:
{myfield} = $_GET[‘par1’];

My question is, is SC using a _GET when you assign the globals?

Regards,
Scott.