Forms module not working

edited March 2016 in Bug Reports
Can anyone help?

I've installed the forms plugin and create a form 'volunteers' which contains name and email fields. It's set to 'published'.

On my CMS page, I've added {form('volunteers)} but when I display the form, I get:

A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'name'
Filename: libraries/Fuel_forms.php
Line Number: 74

A PHP Error was encountered
Severity: Warning
Message: Illegal string offset 'slug'
Filename: libraries/Fuel_forms.php
Line Number: 78

Digging into Fuel_forms::get(), line 128, where it looks for a form in the database $form_data = $forms_model->find_one(); it's returning an empty dataset. If I follow immediately with $forms_model->debug_query(); it displays the query as "SELECT `forms`.* FROM (`forms`) WHERE `name` = 'volunteers' OR `slug` = 'volunteers' AND `forms`.`published` = 'yes' LIMIT 1" which is what you'd expect and if I manually run the query, my form is returned.

Basically, forms module isn't seeing the form I've created and then gets confused when it tries to create one. Any suggestions?

Comments

  • Fixed. Not sure how. I built a scratch site to test which worked. Copied the forms table from that to the live site and it started working. I deleted the cache directories, rebuilt and reset permissions too so it may have been that...
Sign In or Register to comment.