Page MenuHomePhabricator

Form input and response handling for Grant Metrics
Closed, ResolvedPublic8 Estimated Story Points

Description

This ticket is for handling form input, validating the input values and transmitting back errors, if any, back to the form view (with rest of the input data pre-populated).

These errors could, for example, be - duplicate program name/event name, incorrect usernames, incorrect dates, any other incorrect event data etc.

I don't know to what extent Symfony automates this for you. Here's a reference for how we did this with Slim for iegreview app.

Event Timeline

kaldari set the point value for this task to 8.Oct 24 2017, 11:12 PM
DannyH triaged this task as Medium priority.Nov 8 2017, 12:07 AM
DannyH edited projects, added Community-Tech-Sprint; removed Community-Tech.
MusikAnimal subscribed.

I think we are all set here, for the time being.

Basically you add your validation constraints within the model class, and they get automatically rendered in the view when you use {{ form_errors(form) }}. There's a tiny bit of hackery involved for i18n, but I've explained it in the README.

Relevant Symfony docs:

Commit, should you wish to review: