Binding to node published event in custom property editor
Hi,
I have a requirement to create a list of 'person' nodes in the content section of Umbraco. Each 'person' node will have a property called 'Email address' and a button named 'Send email'. The 'Email address' property is a core data-type of type 'email', the 'Send email' button is a custom property editor, which when clicked makes a call to an API Controller which sends an email to the person.
I need to make it such that the 'Send email' button is only visible when the person node is saved and published with the mandatory 'Email' property populated.
I have the custom property editor working so that when you edit a person node it 'knows' whether that node has an 'Email' value - if it does, it shows the 'Send email' button; if it doesn't it shows a message saying 'Please enter an email address and save and publish to send an email'.
The part I'm struggling with is getting the custom property editor to be aware of when the node has been published and to change from displaying the message to displaying the button without refreshing the page.
Can anyone suggest how to detect when a node has been saved from within a custom property editor?
Binding to node published event in custom property editor
Hi,
I have a requirement to create a list of 'person' nodes in the content section of Umbraco. Each 'person' node will have a property called 'Email address' and a button named 'Send email'. The 'Email address' property is a core data-type of type 'email', the 'Send email' button is a custom property editor, which when clicked makes a call to an API Controller which sends an email to the person.
I need to make it such that the 'Send email' button is only visible when the person node is saved and published with the mandatory 'Email' property populated.
I have the custom property editor working so that when you edit a person node it 'knows' whether that node has an 'Email' value - if it does, it shows the 'Send email' button; if it doesn't it shows a message saying 'Please enter an email address and save and publish to send an email'.
The part I'm struggling with is getting the custom property editor to be aware of when the node has been published and to change from displaying the message to displaying the button without refreshing the page.
Can anyone suggest how to detect when a node has been saved from within a custom property editor?
Thanks all
I've come across this topic, the answer for which works: https://our.umbraco.com/forum/developers/api-questions/74724-check-if-node-has-been-saved-and-published-in-property-editor.
is working on a reply...