Forms in web2!

3 views
Skip to first unread message

Rob Allen

unread,
Aug 8, 2014, 2:34:50 PM8/8/14
to joindin-d...@googlegroups.com
Hi all,

This week, we’ve managed to merge Mike van Riel’s work on forms in to web2. This work integrates Symfony2’s form system with our Slim Framework based application. Fortunately, we use Twig for rendering the HTML views, so Mike was able to integrate Sf2’s form rendering too. Thanks Mike!

This means that forms in web2 are made up of a Type class (e.g. https://github.com/joindin/joindin-web2/blob/master/app/src/Event/EventFormType.php) which defines the elements of the form and how they are validated. The rendering is then done in the Twig template using the form rendering functions as shown here: https://github.com/joindin/joindin-web2/blob/master/app/templates/Event/submit.html.twig#L22.

The main benefits we gain by using the Symfony2 forms system are:

* All the elements are rendered in with the Bootstrap 3 divs and relevant classes automatically for us.
* Validation is centralised in a single form type class.
* We get Sf2’s CRSF implementation.
* There’s a good amount of Sf2 form knowledge in the community that we can leverage.

So, now that we have our first form in place, we can add some more! The next one I’d like to see is user registration…

Regards,

Rob...

Lorna Mitchell

unread,
Aug 13, 2014, 6:54:08 AM8/13/14
to joindin-d...@googlegroups.com

Thanks Rob and Mike, this is a really valuable addition to web2 and I know a lot went into making sure we got the implementation correct.

Is there already a bug/task for user registration open on http://joindin.jira.com in case anyone wants to pick that up?  I don't think the API endpoints exist yet for creating users either ...

Thanks

Lorna




So, now that we have our first form in place, we can add some more! The next one I'd like to see is user registration...

Regards,

Rob...

--
You received this message because you are subscribed to the Google Groups "joindin-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joindin-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lorna Mitchell
http://lornajane.net


Mike van Riel

unread,
Aug 14, 2014, 4:21:36 PM8/14/14
to joindin-d...@googlegroups.com
If I recall correctly neither the issues nor the api endpoints are there.
Reply all
Reply to author
Forward
0 new messages