Forums

How to find the SQL query code in the form

qamar0786 04 Aug, 2016
Hello,
I have recently added a new input field (i.e. hilalcommitteemember) in a CF4 form.
I later decided the filed-name was too long and decided to abbreviate it (hc_member).
I also renamed the related table name to the abbreviated version using phpAdmin tool.

Now the form breaks when I try to save it as I don't know how to amend the SQL code as well.
Please could you advise me where to look for the SQL code (or PHP $query code)?

The extract if the error I received is shown below, where I need to rename the column name.
1054 Unknown column 'hilalcommitteemember' in 'field list' SQL=UPDATE `#__acymailing_subscriber`
Thanks in advance for your help.
Qamar Uddin
GreyHead 05 Aug, 2016
Hi Qamar ,

It's not possible to identify exactly where the code is from the information here. As it is writing to the #__acymailing_subscriber table I'd guess that it is in a Custom Code action in the form On Submit event.

Bob
qamar0786 08 Aug, 2016
Thanks for you reply. I have already checked all the on-submit action but could not see any custom code.
I wonder if there is a trigger somewhere which runs a php script with the SQL update code?
GreyHead 08 Aug, 2016
Hi Qamar,

Do you see any useful information if you add a Debugger action to the form On Submit event? If there is no Custom Code and you are using a DB Save action then the column error should not arise.

Bob
qamar0786 08 Aug, 2016
I have tried adding a Debugger action in On Submit action and it shows a list of array values in the front end, but the error occurs when I try to save the form in the back-end (from joomla administrator).
qamar0786 09 Aug, 2016
I have now found the source of the error - it was hidden in a joomla extension, so renaming that in phpadmin has fixed it.
Thanks anyway.
This topic is locked and no more replies can be posted.