Developer forum

Forum » Rapido » Field values are not being populated with the correct TemplateTag

Field values are not being populated with the correct TemplateTag

Fabio Monte
Reply

Hello

When populating the user field values in a Contact Form, the GetString("Field.Value") is always returning empty so i had to use the GetString("Field.ValueFromAutoOrDefault") tag since it was on this tag the values were being populated. (i.e: Company, Phone, Name)

Aren't the values supposed to coming from the GetString("Field.Value") tag instead ?

 


Replies

 
Nicolai Pedersen
Reply

Hi Fabio

In what template? GetString("Field.Value") will probably only have a value in the receipt but not when rendering the form...

BR Nicolai

 
Fabio Monte
Reply

Hi Nicolai

It's the Form.cshtml template under Forms > Blocks

Since this was a customer requirement, we used the GetString("Field.ValueFromAutoOrDefault") tag instead in a custom block to render the user details in the form (when logged in of course).

 
Nicolai Pedersen
Reply

GetString("Field.Value") tag will return the value of a post (or get) to the form or receipt. So if you access the form like this:

/contact/contact-form?somefieldSystemName=SomeValue the tag will contain SomeValue.

BR Nicolai

 

You must be logged in to post in the forum