1

How can i get Text Box Id in SharePoint NewForm.aspx ? Using Js-Link . . i want to bind Color-picker Control of Jquery to Text-box ..

Can anyone have an idea about this? kindly give me suggestion. Thanks in advance.

0

@Dipen If your field internal name is text_colorpicker then you can get the textbox by the following

$('[title="text_colorpicker"]')
  • 1
    when we use Jslink on NewForm.aspx in share point . than Jslink override custom control to the share-point control .So when you are using jslink than you have to create your own control. – Dipen Shah Jul 6 '15 at 10:56
  • ya absolutely right Dipen Agreed – Chandrakanth Jul 6 '15 at 11:39
0

You will find textbox of any field by internal name of column in list. Like if your internal name of column is like 'text_colorpicker' then textbox will be generate with id = "text_colorpicker" in NewForm.aspx which is sharepoint's inbuilt functionality..

Then you can easily access that textbox i.e.

$('[id$="text_colorpicker"]')

But if you have applied JSLink on that field then you have to create your own control by yourself by calling function and returning HTML to render on page.

Hope you will get idea.

  • 1
    Mr.Kaushal Sharepoint create dynamic id for each fields type. So i m not able to get id by this method which is show u in answered. – Dipen Shah Jul 6 '15 at 10:35
  • You Welcome Dipen...!! – Kaushal Khamar Jul 6 '15 at 11:02
0

I have resolved this issue and implement successfully.

https://codeplayandlearn.wordpress.com/2015/07/07/bind-colorpicker-control-to-the-sharepoint-list-field-using-jslink/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.