calguy1000 wrote:You guys are over-thinking a simple problem.
A: The value_XXXX=something only allows you to set a default value for a field ONLY when it is first rendered. Your form doesn't get rendered when the submit button is pressed.
Sorry, I don't understand this.
The scenario is:
I have several pages with information about several events. I want to link from these pages to a page with a form to inquire more information about the event. I need to tell the form on this other page which event is in question. So I use a POST or GET variable, e.g. $event, the value is, say, "Event Nr. 12".
On the page containing the form, I call the Formbuilder module, the form it uses has a hidden field ID 41 with a default value.
So far, everything is ok.
Now I override this value with
{FormBuilder form="anfrage" value_fld41="Event Nr. 12"}
--> when I manually insert this, all is well.
BUT: when I use a POST (or GET) parameter, it fails:
{FormBuilder form="anfrage" value_fld41=$smarty.post.event}
--> the data apparently do not even reach the FormBuilder module, no mail is sent, not even the field validation for mandatory fileds kicks in.
In both cases, the generated form is identical, as are the POST data sent by the form.
My question is:
calguy1000 wrote:The value_XXXX=something only allows you to set a default value for a field ONLY when it is first rendered. Your form doesn't get rendered when the submit button is pressed.
How does this apply to this problem? As far as I understand it, the form is only rendered ONCE (by the module call). We do
not try to render the form by pressing the submit button ...
Can you please explain what you meant? I really don't understand this.
Cheers,
Alex