Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Add to List if not in Drop Down

$
0
0

bcobra,

Correct me if I'm wrong: you have a List called 'Fields' and a column in that list being used as a lookup called:

'Columns (fields)'

I added such a field to a list on my site, then put this code in a CEWP on the NewForm.aspx and the link appeared.  Apparently this selector works with the field display name rather than internal named.

$(document).ready(function(){
$("input[title='Columns (fields)']").parents("td.ms-formbody").append("<a onclick='javascript:AddColumn()'>Add New Columns(fields)</a>");
});


Tell us more about where you are putting your code.

I can't say whether the rest of russ' code will work for you since the internal field name is not 'Columns (fields)'

because this has special characters and spaces, the internal field name is:

'Columns_x0020__x0028_fields_x002'

Also, when you rename a column in a list, the internal name stays the same so check the html output of the NewForm to confim the internal name.

 


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>