Hello, all!

Today is my day off, and of course, I spent it fiddling with contrib modules. Some of this stuff is absolutely absolutely amazing!

I just installed the webform module, and I like it! I run a scans reference gallery, so I want two of the same form. 1 for submitting completely new information, and 1 for submitting corrections to information that is in the Gallery. I don't to make it too hard on myself, but I thought I could create a 'Correction form' that has two fields pre-filled (populated?) from the URL.

In the webform instructions it says something about %get[key]... what do I do to the URL? I want to prefill two fields... would this be something like mysite/node/1/edit%field1%field2 , and then I write in the for the value in the webform, %get[1] or %get[2]?

Do I even make sense? I have no idea. It takes time to make sense... ^.^;

Anisa.
A good wind is blowing.

Comments

mo6’s picture

Use %get[param] as the default value, then access your page with mysite/node/123?param=value

rivena’s picture

Thank you for your reply!

Does it matter if it is param or key? I'd like to have two values, can I just & them together? Hm, would that need two &&s...

Thanks again!

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------

mo6’s picture

You can use any term for "param". If you have two fields, fill the first default value with %get[param1] and the second with %get[param2]. Then use the url mysite/node/123?param1=value1&param2=value2.

rivena’s picture

Thank you for your help! That's exactly what I wanted to know. I'll try it out. :)

Anisa.

-----------------------------------------------------------
Kindness builds stronger bonds than necessity.

www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------

andrenoronha’s picture

i created a webform for users to denounce a kind of content... and i used the prefilled feature to fill the node name field. so i set the link like that: page?param=title

that's ok.

Now I'd like to direct the user back to the node after sending the form... so i added &destination=node/[nid] but it doent work. i cant use the destination feature of webform cause I want dinamic urls with the node id.

So How can I set a dinamic destination page?

markchitty’s picture

For v3 the format was:

%get[customer_name]

Instead use the following format;

[current-page:query:customer_name]

if your url was formatted as:

www.mysite.com/webform/myform?customer_name=foo