add placeholder to search Input filed

add placeholder to search Input filed

MbdesignMbdesign Posts: 17Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Alan, please can you add the palceholder function to all input fields, so it is easyer for everybody to use.

Adding by jquery is not possible??
http://datatables.net/forums/discussion/7616/adding-placeholder-to-the-filter-text-input/p1

Somebody a quick and short idea?

Replies

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin
    Its possible using Editor 1.2.3 and the `attr` option for the fields: http://editor.datatables.net/fields/#text .

    [code]
    editor.add( {
    "label": "Name:",
    "name": "name",
    "attr": {
    "placeholder": "Your name"
    }
    } );
    [/code]

    The `attr` option is attractive because it allows any HTML attribute to be controlled on the input element.

    Regards,
    Allan
This discussion has been closed.