Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Add logic to the edit mode interface

In one of the page types I would like to add some logic in the edit mode. I want the publish stop date to be mandatory if a certain check box not has been ticked. If the check box has been ticked the publish stop date is not mandatory. Does anybody know how to do this? The reason for doing this is that we want to avoid information that is out of date. The publisher will be forced to consider whether the page will be out of date someday or if the information will be valid forever (the check box will be ticked if the information should be valid forever). I was thinking of catching the global SavePage event, but then the page will be saved even if the stop publish date has been negelected (and no check box ticked), since my event handler has been preceeded by another one. I am thinking of adding a javascript. But I do not know how to add it only to the edit mode. Any ideas anyone? Thank you. Best Regards /Sofia
May 11, 2005 10:44
If you mean the DataFactory.SavingPage, I don't see why this shouldn't help you. When saving the page, in this event you can check if the page's check box has been ticked, and if so, check whether the StopPublish property is set. If not, you can do a CancelAction. See the SDK under Datafactory class events for more information. Frank :)
May 11, 2005 12:42
Can you use the following example where you can validate the page before it's saved: Frode
May 12, 2005 9:38
Thank you very much Frode. Exactly what I was looking for! Can I do anything for you? :) /Sofia
Jun 15, 2005 10:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.