Hi,
I want to know how to automically submit a SAEF using hidden fields. Why? I want to track what files a registered user is downloading, so I have created a weblog called “user_downloads” with two custom fields, “user” and “download_file”. When one of my registered users accesses a members only page I want to submit the relevant data into my “user_downloads” weblog, I dont want the user to know that this is happening.
The only way that I can think of doing this is by creating a SAEF that contains hidden fields and submitting it using some JavaScript i.e.
The template code:
{exp:weblog:entry_form weblog="user_downloads"}
<input type="hidden" name="user" id="user" value="{username}" />
<input type="hidden" name="download_file" id="user" value="name of download file" />
{/exp:weblog:entry_form}The JQuery:
$("#entryform").submit();Is this the best/only way of achieving this?
Thanks in advance
Gary