Re-fill form with collected data

Hi, Sitejetter

With Sitejet we can collect and use the data provided by the visitor on his customer portal.
The data can be added as text on the site but not directly on the field which would allow the field to be pre-filled.
Text can be added between the fields in the form but it is not taken into account in the email.

Hi! I’m not really sure I understand what you need.

  • Do you need to pre-fill some form fields with default values?
  • Do you need to pre-fill some form fields through custom url params?
  • Do you need to edit in the front-end, existing entries?

Can you give us more details, or an example?

Hi, Lucian
Thanks for your answer, I’m looking to pre-fill some form fields with bindings datas (see screen) like for the customer defined schedule display.


Hi @DavidL ! I understand now. This is not available in Sitejet, but can be achieved with a trick and a few lines of custom JavaScript code.
If you are a bit familiar with JavaScript, I can create an example, but you need to adapt that example to your needs/fields.

Hi @Lucian_Dinu I understand thank you for your help, I think it’s a bit of a shame that Sitejet doesn’t use this data.
I know how to integrate and understand a little javascript, it would be with pleasure if you had an example.
Thank you for your help.

Hi @DavidL , here is a tutorial/example on how to bind the Website Customer Contact data to the form fields.
Basically, the idea is to prefill some form fields with the data from the Website Customer Contact data.

JavaScript code used:


   //Form ID
   var FormID = '#ed-70244615';
   //Checking if we are running this in the CMS Editor
   //Checking if we are on the Form page
   if($(FormID).length & $("body:not(.edit)").length){
       //console.log("we are on the page with the contact form");
       var company = $("[data-bind='']").text();
       var message = $("[data-bind='customer.custom1']").text();
       $("#ed-70244621 input").val(company);
       $("#ed-70244633 textarea").val(message);

Hope this helps!

@Lucian_Dinu Yes very much and many thanks for your great work, explanations and availability :blush: