+ Start a Discussion

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.






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.




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.




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


Please go through the link :




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.