How do I pass todays date to the form

Last updated Feb 01 2018

You can pass the date to the form using query string parameters.

If you are linking from Salesforce create a formula to produce the link, for exmplate:

"https://webinar.formtitan.com/d295e5b81517496813305?fld3="  & TEXT(YEAR(TODAY())) & "-" & TEXT(MONTH(TODAY())) & "-" & TEXT(DAY(TODAY()))

The format for the date is should be YYYY-MM-DD.

If you want to set the url from your site, you will need to use this JavaScript code:

var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
dd = '0'+dd; // Add 0 pad!
}

if(mm<10) {
mm = '0'+mm; // Add 0 pad!
}

today = yyyy+ '/' + mm + '/' + dd;


var URL = 'https://webinar.formtitan.com/d295e5b81517496813305?fld3=2018-01-31?fld3=' + today;

Now you can use this url variable in the embed script / iframe.

 

CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.