[SOLVED] Odd behaviour when adding using a Fabrik form

genyded

Active Member
Hi,

I have some JS that redirects after adding a URL param for a Fanrik form. It works fine when editing the data, but when adding data it seems like the JS never fires. The JS is in the site template head, so it would seem it whould always be processed first, however adding returns:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY text ASC' at line 4 SQL=SELECT DISTINCT(`ep_topic`.`id`) AS value, `name` AS text FROM `ep_topic` AS `ep_topic` WHERE conf_id = ORDER BY text ASC

I am setting the cid value for a db join on a form dropdown element in the data where clause WHERE conf_id={cid} which should get the variable from the URL and it does on edit, just not add. I added an alert to top of the JS and it does not fire on add, so it's like the add query is tyring to invlike before the page is loaded...

Any thoughts?

TIA,
Dale

 
I was able to work around this by using a cascading dropdown (the 1st one is already filtered and working with a default on the form load). This gives me the same net (the 2nd one filtered) without having to worry about it on the load. I still think the is something 'flaky' with WHERE clauses on redirected from dropdowns that are based on dbjoins though. Don't have time to look further into it now though.

Dale
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top