By lilyvaly on
Greetings,
How does one pre-fill a field in a webform, with the title of a page node?
If the default value in webform, is '%get[title]'.
Do I access the webform using
1) mysite/node/3?title=value OR
2) /node/3?title= echo $title;
Appreciate some help here.
lilyvaly
Comments
Hmm...
I'm wondering if you're ready to do forms if you don't know this. All form fields have a "default_value".
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Using webforms
I am using the webforms module. And I am able to add default values of username and email. So I would say that I am aware that one of the properties of the field object in a form, is a default value.
So in that aspect, I am asking the above question, of how I can pass the value of the title of the page node to another webform, to be displayed(i.e defaulted) in a specific field.
More simply put, how do I access the 'title' property of the page node? Is it with 'page.title'? Am I missing some syntax, to pass the title value to the webform? I have tried to pass other hard-coded values to the webform, and it seems to work.
Do hope that it is clearer..
Here you go...
This gets the title of the active page.
To generically get the title of any page (or story, etc.)
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Thank you
Will try it out soon.