SOLVED

Re: How to record date of activity

Go to solution
Cecile_Maindron
Level 10

How to record date of activity

Hi,

I need to record in a specific field the date of activity (dd/mm/yy hh:mm) when a lead has filled out a form however I cannot find how to do that.

Cécile @ Talend

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Cecile_Maindron
Level 10

Re: How to record date of activity

I haven't succeeded in implementing your javascript but I have managed to make it work by creating a change data value flow = {{system.dateTime}}

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Re: How to record date of activity

A small jQuery can meet the requirements. i did not fully test it.

 
<s c r i p t language="Javascript" src="/js/public/jquery-latest.min.js" type="text/javascript"></s c r i p t>
 
<s c r i p t>
var $jQ = jQuery.noConflict();
 
var d = new Date();
 
var month = d.getMonth()+1;
var day = d.getDate();
 
var output = d.getFullYear() + '/' +
    (month<10 ? '0' : '') + month + '/' +
    (day<10 ? '0' : '') + day;
 
document.getElementById(“Field_Name”).setAttribute("value", output);
 
</s c r i p t>


=== Spaces added to the word "script" to avoid the system interpreting as instruction ===
Cecile_Maindron
Level 10

Re: How to record date of activity

this may sound like a trivial question but I can copy/paste code in my landing page html and I just need to replace Field_Name by the customized Data Activity Field?

Anonymous
Not applicable

Re: How to record date of activity

It is genuine question. Diving into code is really entering an uncharted territory.
 
Yes, you can copy/paste the code into a HTML block of you landing page and replace Field_Name with the actual field ID.
You can find the field ID viweing the source. 

A real example clarifies. In the following code tye field ID is Email

class='mktField' ><label>Email Address:</label><span class='mktInput'><input class='mktFormText mktFormEmail' name="Email" id="Email" type='text' value=""


 
Cecile_Maindron
Level 10

Re: How to record date of activity

I haven't succeeded in implementing your javascript but I have managed to make it work by creating a change data value flow = {{system.dateTime}}