More in this section
Forums / Module Builder / How to enable the validation for check box list (Choose Field) for a custom Dynamic Module using Sitefinity 8.0

How to enable the validation for check box list (Choose Field) for a custom Dynamic Module using Sitefinity 8.0

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Uttam
    Uttam avatar
    21 posts
    Registered:
    17 Mar 2015
    10 Apr 2015
    Link to this post

    Hi,

    I'm new to the Sitefinity (V8.0) and I'm working on adding some new Content Types using Administration > Module Builder and I have to include a Check box List/Drop down list with validation such that content author should select a option before Publishing the content and I don't see any settings to do so. 

    Any help is appreciated.

    Thanks.

  2. Uttam
    Uttam avatar
    21 posts
    Registered:
    17 Mar 2015
    13 Apr 2015
    Link to this post

    I Found the solution under Advance > DynamicModules > Controls > CustomContentType > Views > CustomBackendInsertView >  Sections > MainSection > Fields > Departments (Choice Field) > Validation  and make the field "Required" as True and also enter some validation message under "Required Violation message" field. Repeat above steps for CustomBackendEditView as well if required for existing content.

    With the solution found above, 50% of my work is completed but I also need to TURN ON  "Yes/No" (make the checkbox selected) field value by default. I tried modifying the advance settings as I did for "Choose field" but no help. Here is the xml from the "DynamicModuleConfig.config":

    <field mutuallyExclusive="False" renderChoiceAs="SingleCheckBox" hideTitle="False" returnValuesAlwaysInArray="False" id="BoolValControl" dataFieldName="BoolVal" displayMode="Write" wrapperTag="Li" title="Bool val" fieldType="Telerik.Sitefinity.Web.UI.Fields.ChoiceField, Telerik.Sitefinity" cssClass="sfFormSeparator Uttam" fieldName="BoolVal" type:this="Telerik.Sitefinity.Web.UI.Fields.Config.ChoiceFieldElement, Telerik.Sitefinity">
                                        <choicesConfig>
                                            <element text="Bool val" value="Bool val" enabled="True" selected="True" />
                                        </choicesConfig>
                                        <validator expectedFormat="None" maxLength="0" minLength="-1" regularExpression="^(.{0,})?$" required="True" maxLengthViolationMessage="The input is too long" messageCssClass="sfError" minLengthViolationMessage="The input is too short" validateIfInvisible="True" />
                                        <expandableDefinition expanded="True" />
                                    </field>

     

    Thanks.

     

     

     

     

2 posts, 0 answered