0

I want to get selected value from drop-down and display the value in textbox in SharePoint standard list form.

How can I achieve this?

1
  • If you find any of the answer below helpful, please mark it as answer.
    – Garima
    Sep 26, 2013 at 7:27

2 Answers 2

1

This could be done using jQuery easily.

to get selected data you can use

$("#dropdownid option:selected").text();

And to populate text box

$("#textboxid").val("ValueYouWantToAssign")

You have to include jquery reference for using this. If using sharepoint 2013 it is already included.

For more info: http://api.jquery.com/

0

Using jQuery you can get the value from drop-down and display it in text-box:

//This gets selected value from drop-down control:

var ddl_value = $("#drop-downID option:selected").text();

//This updates and displays value from drop-down in text-box:

$("#textboxid").val(ddl_value);

But remember you cannot edit the default list forms. To add this code you should create a custom list form and make that form as the default form (edit/new). This can be achieved in SharePoint Designer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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