This project is read-only.

Required form field

Topics: Developer Forum, Project Management Forum
Mar 20, 2009 at 10:58 AM
Hi All,

Is it possible to add the ability of setting a field required in the custom form ?
This way, a web user must fill required fields in order to submit the from.

One more thing, is it possible to change the send button text ?

Thanks,
R0bb12
Mar 22, 2009 at 6:50 PM
If you ask about item's Edit GUI input form (the one generated on item class definition and attributes you've supposedly decorated the latter's properties), then [Editable ... ( ... Required = true)] should suffice. Otherwise, if you're talking about the .aspx/.ascx template, you've assigned to your item via TemplateUrl property or [Template] attribute, then you're free to implement validation/submission any possible way ASP.Net allows you, e.g, you may resort to standard validators -or- use jQuery validation framework -or- whatever -- N2 has nothing to do with this..
Mar 23, 2009 at 12:07 AM
Edited Mar 23, 2009 at 12:08 AM
Sorry, you'd have to venture down the source code and add this functionality.

Here is one starting point: http://code.google.com/p/n2cms/source/browse/trunk/src/wwwroot/Templates/UI/Parts/Form.ascx.cs
Mar 23, 2009 at 8:58 AM
Thank you guys for replying to me.
libardo : Did you plan to add this functionality in a future release?

Mar 23, 2009 at 9:24 PM
Not exactly, but your welcome to post the idea on the issue tracker and/or submit a patch =)