Form processing into table with Store Data
I've defined a form and linked it to a table (ticked "Store data" and linked to my target table)
I know that bit works as I mistyped a field name and got an error (I've correct that).
When I click Submit there is disk access (I'm running local) and I get transferred to the selected jump page.
The system log states
Quote:
Show the details of record ID 496
ID: 496
Date: 2010-02-07 23:41
Origin: Front end
Category: FORMS
User:
Details: Form "FoBMCP Observations Add" has been submitted by xxx.xxx.xxx.xxx
Function: Form processFormData()
IP address: xxx.xxx.xxx.xxx
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
But the table is not updated with another row of data.
I read the tuturial at TYPOlight Tutorial - Form processing using custom PHP script but that seem to be aimed at complete custom code.
I thought that by selecting "Store data" a new row of data would be added to the table.
Enlighten me please!
Re: Form processing into table with Store Data
You'll probably need to make sure all table fields are present in the form (you can add them as hidden fields in the form).
I think id and tstamp take care of themselves, but any others will need to be in the form and also the data will need to be submitted as the correct type (eg string etc).
Re: Form processing into table with Store Data
Hi ramjet
Many thanks for responding
Quote:
Originally Posted by ramjet
You'll probably need to make sure all table fields are present in the form (you can add them as hidden fields in the form).
I used SQLyog to and found that the data was there and had been for some time. I had checked much earlier in my development and no records were then found but I must of corrected an error without realising it. But the records were not displayed in either the BE or the Catalog List
Quote:
Originally Posted by ramjet
I think id and tstamp take care of themselves, but any others will need to be in the form and also the data will need to be submitted as the correct type (eg string etc).
You are correct. The problem is the pid field. The records defined through the BE had a pid value 2 but the ones via the form a pid value of 0. When I used SQLyog to change them to 2 they were then displayed in the Catalog List. So looks like a hidden pid field of value 2 is needed.
Also noted sorting value is not set but that's not important as far as I can see.
Thanks again