Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint Form Boolean Field (Checkbox) validation

$
0
0

Hi All - I created a EditForm for a list in SPD. This list has a column of type Yes/No (SPFieldBoolean) . When I don't customize this column it rendered as 

<input title="Is Account Created" id="IsAccCreated_faeb125f-0938-4456-a800-e1da8b6390b4_$BooleanField" type="checkbox">

As soon as I edit this EditForm.aspx this checkbox renders as

<input name="ctl00$ctl55$g_47c2adec_d9ec_4cd4_8e18_f10d3796118c$ff171$ctl00$ctl00$BooleanField" id="ctl00_ctl55_g_47c2adec_d9ec_4cd4_8e18_f10d3796118c_ff171_ctl00_ctl00_BooleanField" type="checkbox" checked="checked">

I need to do validation on this field. I was trying to get the control using title 

var chkIsAccCreated = $j("input[title='Is Account Created']"); but this doesn't work on the customized EditForm.aspx because title is missing.

Could anybody please suggest if I can modify the below to get the title or any other attribute?

<SharePoint:FormField runat="server"     id="ff17{$Pos}" ControlMode="Edit"    FieldName="IsAccountCreated" __designer:bind="{ddwrt:DataBind('u',concat('ff17',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@IsAccountCreated')}"/>

<SharePoint:FieldDescription runat="server"    id="ff17description{$Pos}" FieldName="IsAccountCreated" ControlMode="Edit"   />

Is there any attribute that I can add to the above?

Thanks & Regards,

Khushi


Khushi


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>