Inline Edit restriction for custom field type

Hello Folks,

Patrick McQueen , Dennis Wangerin Alan Beam Francesca Shiekh

I have created my custom field type and I want to restrict inline edit of that field type.

I don't want to go to each module's record.js and remove/hide by jquery.

Does any one have any better solution or approach then please let me and all the community know.

Thanks
Prashant
Email : prashant13290@gmail.com

  • Guys,

    I have got one solution like put the below line into _render function of the field type.

    $('span.record-edit-link-wrapper[data-name="' + this.name + '"]').addClass('hide');

    OR

    $('span.record-edit-link-wrapper[data-name="' + this.name + '"]').remove();


    If any one has good approach then please let me know.

    Thanks

  • That sounds like a good solution especially if you have exceptions to your rule, for example if you wish to allow Admin users to edit inline but not others.

    You could also work with the detail.hbs of your field to prevent inline-edit.

    For example in the bool (checkbox) field definition the detail.hbs has the checkbox disabled.

    see clients/base/fields/bool/detail.hbs

    FrancescaS