Editing and Moving Specific Client Side Actions

So I have created a nice set of 4 actions which are triggered when I successfully add a contact to the database. All is working well.

Then I realise I want to change the id of an item involved - in this case, the id of the modal to be closed upon success (from model_add_contact to m_add_contact). So I make the change to the modal, but then I need to change the action too.

  1. Can I change the id of the modal by editing the “hide” entry in the action list?

  2. If I have to delete the existing “hide” entry in the action list which was at position 2, then the new one I add will be at position 4. Can I move it to position 2? Or do I have to delete all the actions in between and re-enter them?

I ask as I cannot see a clear way to achieve either of these tasks!

Best wishes,
Antony.

Okay… I’ve found the move - I have to grab the action where the number is. It would be really nice if I could move it by grabbing it anywhere!

How about editing the detail? :slight_smile:

This sounds like a slightly fiddly method - and generally, somewhat error-prone.

I would press Ctrl+H, enter the old and new IDs and Replace All:

image

You might want to check before clicking Replace All, but given you have a clear naming convention, this is probably not necessary. Generally when changing IDs etc., things can easily break of course, so searching for the relevant terms so you don’t miss one is a good idea.

The same goes of course to making changes such as table names, which could affect multiple files - in which case you would use the global search/replace (Ctrl+Alt+F).

Hey @TomD, thanks for that!

Global search and replace sounds pretty scary right now, but I will certainly bear it in mind as I get more confident!

Best wishes,
Antony.

Global search and replace (across multiple files) would certainly have to be done with much care but very useful for checking terms etc. in context, before making any changes. But search/replace on a single page is not usually much of an issue and something I do quite frequently.

1 Like

Oh yes, of course, what I was trying to change, at code level, is just some text on the dmx-on:success entry! :slight_smile:

Much more easily changed in the code…

Thanks @TomD!

1 Like