I tried to change the foreignkey drop down to text field in the symfony filter form. But after i change the drop down field to text field, my field name changed to xxx_filter[‘foreign_id’][‘text’] instead of xxx_filter[‘foreign_id’]. And everytime i submit the form it show “SQLSTATE[HY093]: Invalid parameter number: parameter was not defined”.
After few hours of googling, i manage to find the solution for this filter form problem. To solve the problem follow the steps below:-
Advertisements
- Open your filter class from lib/doctrine/yyyyFormFilter.class.php
- now you add a function in the yyyyFormFilter.class.php file like below:-
public function convertXXXXXXValue($value) { if (is_array($value) && isset($value['text']) && '' != $value['text']) { return $value['text']; } }
** replace the XXXXXX to your column name
- Now you may try your form again. It should be working now 🙂
Related posts:
How to install apache, php, mysql with macport in Mac OS X
How to print screen in Asus Zenfone 6
WordPress: How to open rss links in new window?
How to enable personal file sharing in Ubuntu 10.04
Bootstrap 3: Responsive image align center
How to flush DNS cache in Linux / Windows / Mac
How to insert new line (line break) in a cell - OpenOffice Calc
PHP Fatal error: Class ‘DOMDocument’ not found in …
Share this with your friends:-