Is there an easy way to set a default value for text form field?
As Brian asked:
empty_data appears to only set the field to 1 when it is submitted with no value. What about when you want the form to default to displaying 1 in the input when no value is present?
you can set the default value with empty_value
$builder->add('myField', 'number', ['empty_value' => 'Default value'])