Form processing and storing tags
I've defined a form to store data to a table and I need to store data like date, user id, user's first name.
I've defined hidden fields and set their value using tags, e.g. {{date}} but this does not work (also reported by other postings)
The only other possibility is perhaps using a form "HTML code" field but I cannot find any examples or instructions as to what is possible using this field.
Re: Form processing and storing tags
try {{date::U}} and store into a field int(10) or the tstamp field ... as Typolight stores dates as Unix timestamps.
Also the user insertags should work (the user must be logged in of course) ...{{user::id}} {{user::firstname}} {{user::fax}} etc.... the fields must be of the correct type (varchar etc)
Re: Form processing and storing tags
You might also want to try: {{date::m/d/Y}}
Re: Form processing and storing tags
Quote:
Originally Posted by ramjet
try {{date::U}} and store into a field int(10) or the tstamp field ... as Typolight stores dates as Unix timestamps.
Also the user insertags should work (the user must be logged in of course) ...{{user::id}} {{user::firstname}} {{user::fax}} etc.... the fields must be of the correct type (varchar etc)
Many thanks Ramjet. I appreciate your help.
However, I am using the standard Form processing in TL so the options for fields are as below (see image).
[attachment=0:colpuxpi]form fields.jpg[/attachment:colpuxpi]
Maybe I should be using Extended Form Generator but I was wondering about the fact that it creates a table - I already have a table used by catalog extension - so I don't want it to mess that up.
Alternatively, I've seen a tutorial about creating ones own form processing but if there is standard code (or existing extensions) that will do the job then seems more straight forward.
Basically, I've used catalog and catalog extension to create search, list and detail screens. I now need to created an add and edit screen in the same style rather than ask basic users to go to the backend.
Re: Form processing and storing tags
Quote:
I've defined hidden fields and set their value using tags, e.g. {{date}} but this does not work (also reported by other postings)
What other postings?
I don't understand...
:?:
you can do what i suggest using hidden fields
eg: store the users first name into the field "whatever" using the user::firstname insert tag in a hidden field.
One of us is missing the boat!! (probably me)
:D
Re: Form processing and storing tags
Many thanks for you continued help ramjet - I came close to giving up on TL but with you help I've made progress :)
Quote:
Originally Posted by ramjet
Quote:
I've defined hidden fields and set their value using tags, e.g. {{date}} but this does not work (also reported by other postings)
What other postings?
I don't understand...
tried to find the "other postings" but couldn't but what I did find made me install efg and moretags
efg is good as it gives me Select DB and allows me to use the table created by catalog and the taxonomy table
Progress! read on....
Quote:
Originally Posted by ramjet
you can do what i suggest using hidden fields
eg: store the users first name into the field "whatever" using the user::firstname insert tag in a hidden field.
A hidden field with {{date::U}} works. Also fields with {{user::firstname}} and {{user::id} work provided that in the "Front end preview" I not only select a "Front end user:" from the drop down list but also click on "Apply" - easily forgotten.
I have one problem left with my form. It's with a date field - I'll make that a separate post
So good progress. Once again thanks for your help. :D