Quantcast
Viewing all articles
Browse latest Browse all 6517

New Post: Add to List if not in Drop Down

jbooker,

   Thanks for the response. You are correct about list =fields and lookup column = 'columns (fields)'. I am putting the code in a text file and adding it to a CEWP on the Newform.aspx and no link appears. I have also deleted the field and and renamed it to just 'columns' for simplicity sake. 

<script src="/_layouts/1033/jquery-1.7.1.js" type="text/javascript">
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$("input[title='Columns']").parents("td.ms-formbody").append("<a onclick='javascript:AddColumn()'>Add New Columns(fields)</a>");
});
</script>

no link shows up.

here is the HTML output of newform.aspx for Column field:

<td valign="top" class="ms-formbody">
		<!-- FieldName="Columns"
			 FieldInternalName="Columns"
			 FieldType="SPFieldLookup"
		  -->
			<span dir="none"><select name="ctl00$m$g_ee5d5855_cb78_4116_a9d4_9e1cbe0912ba$ctl00$ctl05$ctl04$ctl00$ctl00$ctl04$ctl00$Lookup" id="ctl00_m_g_ee5d5855_cb78_4116_a9d4_9e1cbe0912ba_ctl00_ctl05_ctl04_ctl00_ctl00_ctl04_ctl00_Lookup" title="Columns">
					<option selected="selected" value="0">(None)</option>
					<option value="23">test</option>

				</select><br/></span>
			
			


Viewing all articles
Browse latest Browse all 6517

Trending Articles