Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1285 posts 3917 karma points c-trib
    Oct 11, 2018 @ 15:18
    Dan
    0

    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

  • Dan 1285 posts 3917 karma points c-trib
    Oct 11, 2018 @ 15:58
Please Sign in or register to post replies

Write your reply to:

Draft