Can Form Submission Date be stored in Custom Field?

rritz

Member
I am wondering how to get the optin time and date recorded for each optin and be stored in a custom field in the list? Also, can I capture the optin page URL somehow?

Say someone opts in on Dec 27 3:31pm -- can I have this recorded in a REGDATE (Dec 27) custom field and REGTIME (3:31 pm) custom field in my list?

And can I somehow edit the form so that it will write the URL into a custom field as well?
So, when I embed the form on mypage1.com I would add mypage1 into the form somewhere and this would be injected into the custom field for optin URL?

I tried doing this using a custom field and adding a value to the form like this:

<div class="form-group" style="display:none">
<label>optin page url</label>
<input type="text" class="form-control" name="TSOURCE" placeholder="" value="mypage1.com"/>
</div>
but this didn't work.
 
was this introduced recently?
Yeah, is newer, you don;t have it at all ?
does what? It returns a 404 error.
It's just an example, instead of LIST_UNIQUE_ID use your own list unique id, that 13 characters string unique for each email list.
The idea is you don;t have to inject this anywhere, because you can easily find out what the opt-in url is, always, you just need to know the list unique id.
 
Yeah, is newer, you don;t have it at all ?
I have it but it does not accept Tags
I installed 1.5.0 now, but I am weary of the newest releases going into production. I have 1.4.3 on my production server, it works well, I don't want to crash everything by trying to update. I keep an eye on bug reports for the newest releases and I decided to wait a while yet before updating to the latest version

It's just an example, instead of LIST_UNIQUE_ID use your own list unique id, that 13 characters string unique for each email list.
The idea is you don;t have to inject this anywhere, because you can easily find out what the opt-in url is, always, you just need to know the list unique id.
Yes of course I used my own string from backend. Still: Sorry, I don't understand how to use this.

What I want and must do is to add a footer into every single email that says: You receive this email because you opted in on [OPT In DATE] on this page here: [OPT In URL] This is easy with purchased leads, as they already have the right custom fields. But when I build an opt in list, how to do it?
If someone opts in on my blog for instance, the URL is myblog.com but if someone opts in after visiting an ad and a landing page, the URL is mylanding.page

I do not want to manually add opt in URLs to custom list fields. When someone opts in, the custom field should be filled automatically with the correct URL and the correct date and time

Now, when I install a web form on a page, I can add the URL into the form code of course, but how can I then have it filled into a custom list field every time someone opts in?
 
What I want and must do is to add a footer into every single email that says: You receive this email because you opted in on [OPT In DATE] on this page here: [OPT In URL] This is easy with purchased leads, as they already have the right custom fields. But when I build an opt in list, how to do it?
If someone opts in on my blog for instance, the URL is myblog.com but if someone opts in after visiting an ad and a landing page, the URL is mylanding.page
Among the available tags, you will see these:
PHP:
array('tag' => '[SUBSCRIBER_DATE_ADDED]', 'required' => false),
array('tag' => '[SUBSCRIBER_DATE_ADDED_LOCALIZED]', 'required' => false),
array('tag' => '[SUBSCRIBER_OPTIN_IP]', 'required' => false),
array('tag' => '[SUBSCRIBER_OPTIN_DATE]', 'required' => false),
array('tag' => '[SUBSCRIBER_CONFIRM_IP]', 'required' => false),
array('tag' => '[SUBSCRIBER_CONFIRM_DATE]', 'required' => false),
So you can use [SUBSCRIBER_OPTIN_DATE] for date.

Now, when I install a web form on a page, I can add the URL into the form code of course, but how can I then have it filled into a custom list field every time someone opts in?
It's simple. Create a custom field in the list, say SUBSCRIBE_FROM and make it a text field.
Now, when you create your web forms and put them in sites, add the tag as a hidden field, like:
Code:
<input type="hidden" name="SUBSCRIBE_FROM" value="http://www.some-url.com/" />
 
Among the available tags, you will see these:
PHP:
array('tag' => '[SUBSCRIBER_DATE_ADDED]', 'required' => false),
array('tag' => '[SUBSCRIBER_DATE_ADDED_LOCALIZED]', 'required' => false),
array('tag' => '[SUBSCRIBER_OPTIN_IP]', 'required' => false),
array('tag' => '[SUBSCRIBER_OPTIN_DATE]', 'required' => false),
array('tag' => '[SUBSCRIBER_CONFIRM_IP]', 'required' => false),
array('tag' => '[SUBSCRIBER_CONFIRM_DATE]', 'required' => false),
So you can use [SUBSCRIBER_OPTIN_DATE] for date.
that's not working in 1.4.3 or not working for me.

It's simple. Create a custom field in the list, say SUBSCRIBE_FROM and make it a text field.
Now, when you create your web forms and put them in sites, add the tag as a hidden field, like:
Code:
<input type="hidden" name="SUBSCRIBE_FROM" value="http://www.some-url.com/" />
I did that already as first idea but it did not work, no value was inserted into the custom field
I have bigger problem now, as installing 1.5.0 crashed my mysql. I will open new thread
 
Anyone can help me with this? I am stuck. I can't believe no one is doing what I am trying to do ...
Furthermore when I do this:
It's simple. Create a custom field in the list, say SUBSCRIBE_FROM and make it a text field.
Now, when you create your web forms and put them in sites, add the tag as a hidden field, like:
Code:
<input type="hidden" name="SUBSCRIBE_FROM" value="http://www.some-url.com/" />
not only is the URL not written into the custom field, but also the email is not written in!
 
Anyone can help me with this? I am stuck. I can't believe no one is doing what I am trying to do ...
Furthermore when I do this:

not only is the URL not written into the custom field, but also the email is not written in!
Just tested that, and it worked straight away, using a page builder, creating a new form, assigned email, name, and the hidden field (incl the value that it has to have for that form at that location), then test subscribed...and viola, the data was by subscription button press in mwz. I guess it is only the form part that got in your way. Feel free to ask any question :)
 
Hi @twisted1919 I am reopening this thred, as the web embed code for the form is not passing [DATETIME] as expected.

When I grab the form code from mailwizz to embed into my page, the [DATETIME] is already rendered to the current date.
So the code I grab looks like this:
<form action=" ... etc
<div class="form-group" style="display:none">
<label>optin time</label>
<input type="text" class="form-control" name="REGDATE" placeholder="" value="2018-03-01 15:59:19"/>
</div>

etc ...
</form>
so all of my subs now show optin time 2018-03-01 15:59:19 or in my case 2018-02-11 08:24:31 because that's the date I added the form.

When I change the form to
<form action=" ... etc
<div class="form-group" style="display:none">
<label>optin time</label>
<input type="text" class="form-control" name="REGDATE" placeholder="" value="[DATETIME]"/>
</div>

etc ...
</form>

the subscriber is sent to the subscribe page http://mymwdomain.com/customer/index.php/lists/my-list-id/page/subscribe-form
and gets a red bar on the top, saying: Your form has a few errors. Please fix them and try again!

They can hit submit from there and then the form works and actually inserts the right opt-in date and time, but opt-in URL is not passed
But obviously this breaks my leadflow.

So I looked at the soure code of the subscribe page, and there I see:
<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {

$(".field-type-datetime").datetimepicker({
format: "yyyy-mm-dd hh:ii:ss",
language: ""
});

});
/*]]>*/
</script>

which seems to be the right script to put into my form to actually register the date and time in my custom field.
I did this, and now it seems to work alright.
I thought I'd share this, maybe someone will need it some time. Don't know
 
Back
Top