How do you force the comments fields to be mandatory

Topics: Enhanced Blog Edition
Apr 2, 2009 at 8:45 AM
Hi,

When making a comment on the EBE Blog, how do you enforce the fields (e.g. Name, e.t.c) to be mandatory so that the user if forced to enter a value?

Ben
Developer
Apr 2, 2009 at 4:52 PM
Ben,

You should be able to modify the Comments form (in the master page) so that it uses standard ASP.Net validation controls. Using them you can make fields mandatory.

--Vince
Apr 2, 2009 at 11:15 PM

Hi Vince,

I am very new to ASP.Net but I tried what you suggested and used SP Designer to add a RequiredFieldValidator around one of my fields but I just get an error message when reloading the page

<asp:RequiredFieldValidator runat="server" ErrorMessage="RequiredFieldValidator" id="RequiredFieldValidator1">

<label for="idDept">Department (required)</label>

<asp:TextBox runat="server" id="idDept" />

</asp:RequiredFieldValidator>

Any ideas what I am doing wrong here?

Regards,

Ben Jones

From: TheKid [mailto:notifications@codeplex.com]
Sent: Friday, 3 April 2009 2:52 AM
To: Ben Jones
Subject: Re: How do you force the comments fields to be mandatory [CKS:52053]

From: TheKid

Ben,

You should be able to modify the Comments form (in the master page) so that it uses standard ASP.Net validation controls. Using them you can make fields mandatory.

--Vince

Read the full discussion online.

To add a post to this discussion, reply to this email (CKS@discussions.codeplex.com)

To start a new discussion for this project, email CKS@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au

Report this message as spam



Please consider our environment before printing this email.
This e-mail and any files transmitted with it are privileged and confidential information intended for the use of the addressee. The confidentiality and/or privilege in this e-mail is not waived, lost or destroyed if it has been transmitted to you in error. If you have received this e-mail in error you must (a) not disseminate, copy or take any action in reliance on it; (b) notify itsupport@customware.net and the sender immediately; and (c) delete the original e-mail.
Feb 21, 2013 at 3:45 PM
Ben/Vince

I was following this thread regarding adding required field validators to the Commetns Fields but could not find the actual solution.
Can either of you please give me a summary of how to achieve this please.

Thanks,
Sub