Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Popup window knowledge article

eyal abu hamad
Mega Sage

HI,
I need help making fields in popup window Portal view mandatory.

eyalabuhamad_0-1697539374028.png

for example the details filed in this popup to become mandatory.

 

thank a lot

5 REPLIES 5

Peter Bodelier
Giga Sage

Hi @eyal abu hamad,

 

It's easier to help if you share the code for the popup.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

This is OOTB widget

eyalabuhamad_0-1697542534175.png

 

In that case you need to clone the Knowledge Article Content Widget, and change the Client controller as shown below:

c.submitFeedbackTask = function(){
	if(!c.data.reason){
		c.flagMessage = "${Please provide the mandatory details}";
		$("#detailsComment").focus();
		return false;
	}
	
	// Start Customization
	if(!c.data.details){
		c.flagMessage = "${Please provide the mandatory details}";
		$("#detailsComment").focus();
		return false;
	}
	//End Customization
	else{
		c.submitted = true;
		c.closePopup();
	}
	}	

 

Then replace the OOTB widget on the Portal Page with your cloned one.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

where do I change the widget ? 

thanks