Jquery and sharepoint, trying to get a value from a field, and put it into another field -


so have odd issue, trying value text field called name , put field called title. isn't working @ all.

basically, have been doing this: field value using got id part of field.

    <script type="text/javascript" src="https://secureteams.app.aexp.com/sites/fiucmc/siteassets/jquery-3.1.0.min.js">     // getting field      var email = $("#fileleafref_8553196d-ec8d-4564-9861-3dbe931050c8_$onetidiofile").val();      // setting value     $("#title_fa564e0f-0c70-4ab9-b863-0177e6ddd247_$textfield").val( email );     </script> 

granted not best @ jquery, don't think should hard.

var email = $("input[title='fileleafref']").val(); $("input[title='title']").val( email ); 

should work fine if fileleafref field title. need add script document upload form, because answer thriggle question not sure code runs in right place.


Comments