+ Start a Discussion
FredrickUNFredrickUN 

Pre-fill site.com forms

I'm trying to develop a number of forms that a portal user can input data, save and return to the same form at a later date.

 

The problem I'm experiencing is how to pre-fill the form with the answers they have already given. This is easy to achieve in a VF page or using the visual flow.

 

I thought it would be the same for site.com forms but I cant see any feature to call a record lookup and pre=populate the form fields.

 

help!

FredrickUNFredrickUN

Hi,

 

I've delved a little deeper and found out that you can pass values in the querystring. However this will not work for my case as the form includes over 10 long text fields.

 

I've been working on trying to use JQuery to retrieve the data and write the data into the fields using the html dom object. Problem I'm having is that I cannot match the object field to the form field.

SiteforceSiteforce

Hi,

 

For achieving the pre-fill form functionality drag a custom code block in the data repeater element and you can access the fields using ! modifier.

 

e.g:

 

<form action=".">
Product code: <input type="text" name="firstname" value="{!ProductCode}" ><br>
Product name: <input type="text" name="lastname" value="{!Name}">
</form>

 

Please go through the link :

https://help.salesforce.com/HTViewHelpDoc?id=siteforce_data_code.htm&language=en_US

 

CalebECalebE

Could you provide the html that would allow the entered data to be submitted to the Salesforce record?  Also, I was wondering whehther it was possible to pre-populate the field elements of the form or those added separately.  I tried adding an html attribute with a value of "Value" and then the field code ( {!FirstName}, e.g.) but that didn't work.  I also tried adding {!FirstName} as a fixed value to the default value.