Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Page properties dialog validation on 6.4

Avatar

Level 10

All, 

 

I want to validate if a proeprty value exists prior to saving page properties.
Tried below but although it submits the form just stays in its place showing the save and cancel buttons while i want it to take me out of the screen.

Tried  $propertiesForm.submit();

 

Kindly let me know


(function($document, $) {
"use strict";

//form id defined in /libs/wcm/core/content/sites/properties/jcr:content/body/content/content
var PROPERTIES_FORM = "cq-sites-properties-form";

$document.on("foundation-contentloaded", function(){
$("#shell-propertiespage-doneactivator").on('click', function(e){

//validate 

});
});
});

1 Accepted Solution

Avatar

Correct answer by
Level 10

Sure @kautuk_sahni .HTH.

 

(function($document, $) {
"use strict";

//form id defined in /libs/wcm/core/content/sites/properties/jcr:content/body/content/content
var PROPERTIES_FORM = "cq-sites-properties-form";

$document.on("foundation-contentloaded", function(){
$("#shell-propertiespage-doneactivator").on('click', function(e){
alert("clicked");
var $propertiesForm = $("#" + PROPERTIES_FORM);
 //now set required fields required or perform further validations as need be,

}

});
});
})($(document), Granite.$);

View solution in original post

3 Replies

Avatar

Level 10

All,

 

Resolved the issue. Thanks.

Avatar

Administrator

Can you please share the way you resolved it? This would help in posterity. 



Kautuk Sahni

Avatar

Correct answer by
Level 10

Sure @kautuk_sahni .HTH.

 

(function($document, $) {
"use strict";

//form id defined in /libs/wcm/core/content/sites/properties/jcr:content/body/content/content
var PROPERTIES_FORM = "cq-sites-properties-form";

$document.on("foundation-contentloaded", function(){
$("#shell-propertiespage-doneactivator").on('click', function(e){
alert("clicked");
var $propertiesForm = $("#" + PROPERTIES_FORM);
 //now set required fields required or perform further validations as need be,

}

});
});
})($(document), Granite.$);