You are viewing limited content. For full access, please sign in.

Question

Question

How to best dynamically populate a Form's Custom HTML from data entered into Form table fields?

asked on August 10, 2016 Show version history

Hi,

I've seen various posts on how to use JavaScript to populate the Custom HTML after database lookups have run, but having only basic JavaScript skills I'm not sure how to get our requirement to work.  The situation is that the form is being completed in order to generate a quote request (emailed) to one or more sub-contractors.  The user selects various components from dropdown fields in a table, selects the various sub-contractors to whom they want to send the quote request, then completes a comment field specific to the quote request.  I want to be able to display the data from the completed fields in a Custom HTML field at the bottom of the form which will then be the body of the email, effectively showing the user a draft of the email content that's going to be sent.

Here's a quick mock-up of the form, the fields needed for the email (Custom HTML display) would be

  • a list of the items and quantities (prices are just indicative estimates for the user, not going in the email),
  • the content from the Comments field

 

On submitting the form the email would then be sent to the selected sub-contractors.

If there's a better approach to this please feel free to suggest it.

Thanks,

Mike

0 0

Replies

replied on August 11, 2016

Even if you populated the custom HTML field on the form, you won't be able to set the form content as the body of the email.

So if you need the data to be displayed in the email, what about customizing the email service task with variables?

You can insert variables from token picker of the email as below:

0 0
replied on August 14, 2016

Thanks Rui, I've already got that aspect implemented, however it was coming up with a mechanism for displaying the content of the email in a draft format within the form so that the user was aware of what the email was going to look like prior to it being sent.  I think we'll just need to convince them to commit to the email template and ensure that any specific requirements are entered in the comments field for inclusion in the email.

Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.