⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Adding placeholder on input field



dimazarno
  • profile picture
  • Member

Posted 29 January 2014 - 03:44 AM

Dear all,

 

Is there any API function for set up placeholder on input field?

or

Should i tweaking the core library?

 

Thanks.


Amit Shah
  • profile picture
  • Member

Posted 29 January 2014 - 08:05 AM

Well there aint stuff right now available to set placeholders...

but surely can be a nice addon to the library... u can tweek it if u plan to place it in all the forms.. but if its specific to some fields ... i will recommend u using jquery...

 

$("#field-fieldname").attr("placeholder", "Here goes the placeholder content").blur();

 

u can set this in a custom js file of yours and add it using $crud->set_js('mycustom.js') .. wtever suites u


dimazarno
  • profile picture
  • Member

Posted 09 February 2014 - 08:24 AM

Well there aint stuff right now available to set placeholders...

but surely can be a nice addon to the library... u can tweek it if u plan to place it in all the forms.. but if its specific to some fields ... i will recommend u using jquery...

 

$("#field-fieldname").attr("placeholder", "Here goes the placeholder content").blur();

 

u can set this in a custom js file of yours and add it using $crud->set_js('mycustom.js') .. wtever suites u

 

Thanks for the answer, currently i'm using callback field but next time i will use your suggestion. :)