This project is read-only.

Custom Form

Topics: General
Jun 9, 2015 at 2:05 AM
I am new to Orchard. I have downloaded Orchard and installed it. I have also been reading the documentation and watching various videos trying to learn all I can about the CMS. What I am trying to figure out is how I should put an Employee Termination form together using Orchard. The form has many data driven controls on it (drop down lists and check list boxes), there are also a number of fields and whole sections of the form that will be shown / hidden based on selections made by the user, and I will need to send an email out to certain groups based on selections made on the form. I will not have to save the form to the database as this is not required. It seems like Orchard would be a good tool for this. I was looking at the forms module and tried creating a form, but there were a couple of things that I didn't see: 1) No Date field exists in the form fields section, and 2) If I created a custom content type how would I use it on a form? I am guessing with the latter I would have to do a custom form? If so, on custom forms how would I control the layout? Would that be through a template? Any help in getting going down the correct path would be great.

Thank you,

Jun 9, 2015 at 12:47 PM
You may want to give the new Dynamic Forms module a try, which is based on the Layouts feature, which lets you control the layout.
The Dynamic Forms feature provides a bunch of elements that may be useful to you, but if necessary you can extend this set of elements yourself by writing a custom module. Regarding sending an email upon submission, that is easily done via the Workflows feature. Essentially you would add the Form Submitted event activity and the Send Email activity and connect those two (make sure to enable the Email Workflows feature to enable the Send Email activity).
Marked as answer by RG29 on 6/9/2015 at 9:52 AM
Jun 9, 2015 at 1:55 PM
Thank you for the info sfmskywalker. I will give the Dynamic Forms Module a shot!
Jun 9, 2015 at 4:38 PM
I read your article and watched the video on Dynamic Forms and Workflows. Really good job on these. I have a question though. I need a date picker on the form in a couple of places. Looking at the Forms controls I do not see a date picker. What would I do in this case?

Thank you,

Jun 9, 2015 at 4:46 PM
I would create an issue for this on GitHub so we can triage. If you want you can start working on a date time picker element and submit a pull request (linked to the created ticket).
Jun 9, 2015 at 5:52 PM
Sounds good. I will see what I can come up with! Thank you.