Placeholder in textbox

QuestionsPlaceholder in textbox
ramakrishna asked 10 years ago

Hi,
can i know how to put placeholder in grid.
means <input type="text" placeholder="First Name"> we will give in HTML like this
how we will give in php grid

3 Answers
Abu Ghufran answered 10 years ago

You can set:

$col["editoptions"]["placeholder"] = "First name";

Editoptions are translated as input attributes.

Helmi answered 10 years ago

Similar to this question but I want to add data-attribute to option. I.e.
<select>
<option data-attr="attrValue">
</option>
</select>

attrValue = from database where I generate select options

Is it possible?

Abu Ghufran answered 10 years ago

By my knowledge, it is not supported. You can connect dataInit function and set data-attr value using jquery.

$col["editoptions"]["dataInit"] = "function(o){ jQuery(o)……(); }";

Your Answer

5 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?