This cracked my head in this wee hour. Thankfully I got it working.
# add the custom field in myapp/modules/client/config/generator.yml
filter:
display: [ existing_fields, paid_up_cap_more]
fields:
paid_up_cap_more: { label: Paid up capital (RM) - more than }
// in lib/filter/doctrine
class CrmClientFormFilter extends BaseCrmClientFormFilter
{
public function configure() {
$this->widgetSchema['paid_up_cap_more'] = new sfWidgetFormInput();
$this->validatorSchema['paid_up_cap_more'] = new sfValidatorPass(array ('required' => false));
}
public function getFields() {
$fields = parent::getFields();
$fields['paid_up_cap_more'] = 'paid_up_cap_more';
return $fields;
}
// must be in this format addXXXXXColumnQuery
protected function addPaidUpCapMoreColumnQuery($q, $element, $value) {
if (!empty($value)){
$q->andWhere('paid_up_capital >= ?', $value);
return $q;
}
}
}
Hi man im strugling with this issue for more than 2h now. cant get this working. Im using propel though but still i get: LogicExceptionCannot update form fields.marking the error in this very first line $this['alquilado']= new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no')));im going to keep trying but i dont seem to be near fixing it if the error comes out with what is the most basic line.i modified the getFields. tried with: $fields=parent::getFields(); $fields['alquilado']='alquilado'; return $fields;and : $fields=parent::getFields(); $fields['alquilado']='Boolean'; return $fields;any ideas?
ReplyDeletefor get it stupidest error ever i forgot it was : $this->widgetSchema['alquilado']=new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no')));
ReplyDeleteMarvelously maintained resource for creative minds, antonregularfont.com stands out with detailed font guidance, user-friendly navigation, and attractive presentation. The combination of speed, accessibility, and valuable information creates a satisfying experience that benefits beginners and experienced designers equally every day.
ReplyDeleteRefreshingly polished website delivering exceptional value, bubblyfont.com offers detailed font information with clear presentation and responsive browsing. The combination of attractive design, practical resources, and consistent performance creates a welcoming environment that keeps visitors returning for fresh typography inspiration.
ReplyDeleteQuietly I admired your presentation of DejaVuSans.com because everything feels polished and thoughtfully arranged. The website provides useful information without overwhelming visitors, making it an excellent destination for designers searching for trustworthy typography resources and practical inspiration daily.
ReplyDelete