Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to toggle the Admin action buttons with custom feilds


Go to End


2 Posts   811 Views

Avatar
Praveen

Community Member, 49 Posts

30 May 2015 at 3:36pm

Hi,
I'm trying to find a way to toggle the action buttons on changing custom field and unchanging it back.

I have a custom field named TagField which allow to add Tags to the Page. The Tags shows Autosuggest of there exists matching tags already.
I am using below to trigger the action button to change.
$('.cms-edit-form').addClass('changed');
In case user reverts back changes and no edit has been done. How can I check if any other fields is already changed or its only tag field then remove the class
$('.cms-edit-form').removeClass('changed');

Thanks
B L Praveeen

Avatar
Pyromanik

Community Member, 419 Posts

1 June 2015 at 11:08pm

I don't fully understand the question, but this probably holds the answer: http://takeaway.bigfork.co.uk/a-beginners-introduction-to-using-entwine-in-silverstripe