1

How can I get form values in an array instead of doing

array('field1'=>$this->getValue('field1'), 'field2'=>$this->getValue('field2')...)

2 Answers 2

3

You should try

$result = $this->getValues();

Sign up to request clarification or add additional context in comments.

Comments

1

You can use $yourform->getValues() OR forms can be used as arrays. Read more here more with symfony under the "A Form is an Array" section.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.