How to disable the "add" and "remove" button for a list

4 views
Skip to first unread message

Fengzhuo Wang

unread,
Aug 17, 2011, 11:24:07 AM8/17/11
to inputex
Hi all,

I wan to disable the "add" and "remove" buttons for the list field,
and do it via my code. Is there anyway to do that?

Maxime RETY

unread,
Aug 26, 2011, 1:10:33 PM8/26/11
to inp...@googlegroups.com
Hi,

Sorry for replying so late, but there is currently no option or method to disable the "add" and "remove" buttons.

If you feel comfortable with javascript, you can try to extend the ListField class to add whatever behavior you need :

// Example (assuming you use inputEx v0.7.1 and YUI2) :
//
// See : inputex/js/fields/ListField.js

inputEx.CustomListField = function(options) {
    inputEx.CustomListField.superclass.constructor.call(this, options);
};
YAHOO.lang.extend(inputEx.CustomListField, inputEx.ListField, {

   // your code here

});

// Register this class as "customlist" type
inputEx.registerType("customlist", inputEx.CustomListField)


Otherwise, you can create an issue on GitHub (https://github.com/neyric/inputex/issues) to specify your feature request.

Maybe someone in the community will be interested in implementing it.

--
Max
Reply all
Reply to author
Forward
0 new messages