A few "How do I do this..." questions for Forms

Topics: Administration, Customizing Orchard, General
Nov 12, 2012 at 9:08 PM

I have a site I'm trying to get setup for someone in Orchard, and one of the things they want is a sort of extended form (40 - 50 questions maybe more) to have anonymous users fill out to serve as an Application Form, that would be emailed at the end of the submission. But one of the things they would like in the form is your typical "I Agree" checkbox at the bottom to force the person to read a paragraph or so of text. Now I tried using a Boolean Field to do this but I can't find a way to add validation to indicate the checkbox must be checked to submit. Is this possible? Also, what about the section that would be the paragraph of text they have to read. How do I get a non-input content like this (maybe an HTML content area) as a field of the form that would show when filling out the form?

They are also looking to be able to add headers/spacers to the form to create visual sections for the form. I don't see any built-in Fields to display non-input text as a header, is this something I'm missing or would I need to add a new Field type, is that hard to do?

Any help you could give me would be much appreciated, thanks a lot!

Developer
Nov 13, 2012 at 5:14 AM

I'm afraid all that isn't supported out of the box. I would create a custom module and a controller to render your form and collect it's input. That way you can completely customize the looks of your form and do validation.

Nov 13, 2012 at 8:05 PM

As a short-term solution you can use alternates to modify the form rendering which is what I have done until I can generate my own module for form building. You would have to manage your own validation through javascript or HTML5 form validation (though they do not work in IE9).