Category: symfony-forms

symfony sub query with getDQL query

$sub = $this->entityManager->createQueryBuilder(); $sub->select(‘d’) ->from($this->entityManager->getClassMetadata($entityClass)->getName(), ‘d’) ->where(“d.number != ””) ->orderBy(‘d.time’, ‘DESC’); * $qb = $this->entityManager->createQueryBuilder(); $qb->select(‘p’) ->from($sub->getDQL(),’p’) ->groupBy(‘p.number’); * Please correct above subqueries if anything is wrong in it. It is showing error [Syntax Error] line 0, col 14: Error:…

Argument 1 passed to DoctrineCommonCollectionsArrayCollection::__construct() must be of the type array, object given?

1.when i enter data and clicks submit button then iam getting this error. and the error will be shown in below. 2.submit data comes in contactusnew variable but this data doesnt insert into the database. 3.when i run this below…

The target-entity SAMPLESAMPLEBundleEntityAddress cannot be found in ‘SAMPLESAMPLEEntityContactUsNew#adress’?

1.when i enter data and clicks submit button then iam getting this error. and the error will be shown in below. 2.submit data comes in contactusnew variable but this data doesnt insert into the database. 3) But I am getting…

Symfony Form: How to apply different themes/widgets to specific form fields?

A Symfony 3.4 based form contains multiple CheckboxType fields. Some of these fields should be displayed as normal check boxes (= using the default checkbox widget) while some others should be displayed as on/off switches (like iOS UISwitche). So, within…