I have a text field on my form that has the current date and time. I have set this field to be read only. I would like to save this value in the Database and I would like to include this value in the email that is sent but the value is never passed via email or to the database.
I'm setting this field to readonly with some JS onload. If I don't make it readonly it saves and emails the value.
window.addEvent('load', function() {
// function to enable and disable the submit button
// disable the submit button on load
$('txtDateTimeReferral').readOnly = true;
});
I'd like to keep it as readonly and still email and save the value, any suggestions?
Thx,
Jonathan
I'm setting this field to readonly with some JS onload. If I don't make it readonly it saves and emails the value.
window.addEvent('load', function() {
// function to enable and disable the submit button
// disable the submit button on load
$('txtDateTimeReferral').readOnly = true;
});
I'd like to keep it as readonly and still email and save the value, any suggestions?
Thx,
Jonathan
Hi Jonathan,
If you created the database table with ChronoForms then the date and time will be saved in the recordtime column. You could pick this value up and use it in the email.
A read only input should work OK and the code you have there looks OK. I can check it when I'm back in the office in the next couple of days.
Bob
If you created the database table with ChronoForms then the date and time will be saved in the recordtime column. You could pick this value up and use it in the email.
A read only input should work OK and the code you have there looks OK. I can check it when I'm back in the office in the next couple of days.
Bob
I had to remove the readonly attribute to get it to save or email the data for that field.
Let me know what you find out.
Thx,
Jonathan
Let me know what you find out.
Thx,
Jonathan
Hi Jonathan,
This appears to be working OK, see my test form here. The input has the named & id txtDateTimeReferral and the JavaScript is
If you submit the form you can see the date+time in the submitted debug data.
Bob
This appears to be working OK, see my test form here. The input has the named & id txtDateTimeReferral and the JavaScript is
window.addEvent('domready', function() {
$('txtDateTimeReferral').readOnly = true;
});
If you submit the form you can see the date+time in the submitted debug data.
Bob
Yes I believe I saw that as well, re: Debug. It just doesn't save the data in the DB and it doesn't show in the email. It only worked after I removed readOnly.
This topic is locked and no more replies can be posted.