How to provide validation's existing content fragment models datatypes. | Community
Skip to main content
Level 3
Oct 16, 2018 11:38 AM UTC
Solved

How to provide validation's existing content fragment models datatypes.

Hi team,

        How to provide validation's existing content fragment models datatypes.

         How to load clientlibs content fragment model page.

            I created Content Fragment Models,need to do validation's in existing datatypes.

Based existing datatypes created content fragment model page.

Regards

Kotireddy Naru

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Oct 22, 2018 2:24 PM UTC

Hi,

Ok, then you need to add clientlibs with category type of  dam.cfm.authoring.v2

$( document ).ready(function() {

    console.log( "inside CFM - ready!" );

    $("button.button-apply.editor-GlobalBar-item").click(function(){

        alert("clicked");

     })

});

Arun Patidar

6 replies

Level 3
Oct 22, 2018 3:29 PM UTC

thanks Arun,

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Oct 22, 2018 2:24 PM UTC

Hi,

Ok, then you need to add clientlibs with category type of  dam.cfm.authoring.v2

$( document ).ready(function() {

    console.log( "inside CFM - ready!" );

    $("button.button-apply.editor-GlobalBar-item").click(function(){

        alert("clicked");

     })

});

Translate
Arun Patidar
Level 3
Oct 22, 2018 2:03 PM UTC

thanks Arun,

     I dont need to validation's  Content Fragment Model Editor, need validation's  Content Fragment Model Page level

PFA

         

Thanks

Kotireddy

Translate
arunpatidar
New Participant
Oct 22, 2018 1:15 PM UTC

Hi,

Can you check files in network tab or try to put log statement.

working for me.

Saved button event is also working

$( document ).ready(function() {

    console.log( "inside CFM - ready!" );

    $("button.foundation-wizard-control").click(function(){

     alert("save button clicked");

    })

});

Translate
Arun Patidar
Level 3
Oct 22, 2018 12:40 PM UTC

thanks Arun, providing info.

I am adding my validation's below js files.

/libs/dam/cfm/models/editor/components/formbuilder/clientlibs/js/field-properties.js

/libs/dam/cfm/models/editor/components/formbuilder/clientlibs/js/main.js

/libs/dam/cfm/models/editor/components/formbuilder/clientlibs/js/submit.js

       

those Javascript files not loaded properly in model page.

Thanks

Kotireddy Naru

Translate
arunpatidar
New Participant
Oct 16, 2018 4:41 PM UTC

HI,

You can add validation clientlibs as cq.cfm.admin.models.formbuilder

you need to call that function to validate fields on onclick event of save button.

Translate
Arun Patidar