Developer forum

Forum » CMS - Standard features » Forms for editors field dynamic values

Forms for editors field dynamic values

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is there any way I can use some dynamic values as default values for fields in the form?

For example, I have a generic Job form included on a Job page. I would like to store in the Job field, the value from the current page MenuText (Pageview.Page.MenuText).

Is this possible just from the definition of the form or do I have to create a custom template just for this purpose?

Thank you,
Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

A simple way is to submit the fieldname in the querystring. So in the page where you link to the form, if you append "&field_system_name=my default value" it will work.

 

I know this forces you to customize the link to the job application page where the form resides, but it's probably an acceptable customization if you are listing jobs as items.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

I have considered it but it would require even more customization. I was hoping for something similar with what ids used in DataLists or other places where you would add @Code("Something") or @Session("something")

Thank you,

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Yes, that would be nice. Did you meant to do it in the "Feature Requests" category instead? If not, then I have another solution for you :P

 

You can add that logic yourself in the "Value" field, an then customize the template to handle it. 

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum