Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
A site we are developing has nodes associated with members. There is a member picker on the node to associate it.
The client has asked if it is possible to automatically populate the node name with the picked member's value.
I've had a look at using the Content events, however the node name required validation is preventing even getting to this event.
Is this something I would need to edit the angularjs to populate the nodename?
Any ideas greatly appreciated!
Still been researching this and haven't found a solution...would anyone have any ideas?
Need to be able to automatically fill in the Node Name based on a property value entered on the node.
So for example a new node is created, and a value of "Company A" is picked in the dropdown. The Nodename is then automatically filled in with "Company A"
What Content events have you tried to override so far? Maybe the 'saving' rather than the 'saved' event could work for you? (not sure at what point the property validation kicks in though).
Failing that you could create a custom Property Editor that extends the Member Picker data type and adds the member name to your node name when it's selected. However that would be a bit more work...
Thanks for the reply - I have tried Saving and Saved. It appears the node name validation occurs before any server side events (front end validation?).
if you really want to do it when you select the member then you have to create a custom property editor in which you handle the callback of the member Dialog and update the property of the node you are editing.
Don't know for sure how you geht access to the node property but with some testing you should Figuren it out. Maybe it is in scope or in some parent scope.
Shouldn't this mich afford. The Dialogs are fairly simple to use. Here is the API doc if you don't know it already.
A bit old thread, but just wanted to say how I ended up solving this, if anyone maybe finds it helpful.
I ended up using editorState:
var currentEditorState = editorState.getCurrent();
currentEditorState.name = "New awesome name";
My use case was that I needed the node name to match the selection from a dropdown selector.
Thank you, it was very helpful
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted