Hope I'm not missing the wood for the trees, but I have downloaded SPServices 2014.01 Beta to get a handle on the impact on my existing code made by the whole 'Required Field' debacle.
During my testing I'm not certain the SPDisplayRelatedInfo function is working as I am getting a Firebug error: 'TypeError: findFormField(...) is undefined' on the pages that use this function.
If you already know of this and is on the work stack, then please accept my apologies else if there's any further light I can shed, then please shout out.
I'm now back to rocking in my chair mumbling : "It was all working so nicely!"
Comments: For the record, the issue was that I was trying to find a "simple" dropdown using the column comment to handle SharePoint 2010 with the December CU. The error was thrown when the column was not in the page. Split the logic out into it's own section to handle undefined cases: ``` javascript // Last ditch effort // Simple, finding based on the comment text at the top of the td.ms-formbody where the select's title begins with DisplayName - needed for required columns where title="DisplayName Required Field" // Example: SP2010 <select name="ctl00$m$g_308135f8_3f59_4d67_b5f8_c26776c498b7$ff51$ctl00$Lookup" id="ctl00_m_g_308135f8_3f59_4d67_b5f8_c26776c498b7_ff51_ctl00_Lookup" title="Region Required Field"> if (columnObj.Type === null) { var fieldContainer = findFormField(opt.displayName); if (fieldContainer !== undefined) { var fieldSelect = fieldContainer.find("select[title^='" + opt.displayName + "'][id$='$Lookup']"); if (fieldSelect && fieldSelect.length === 1) { columnObj.Type = dropdownType.simple; columnObj.Obj = fieldSelect; } } } ```
During my testing I'm not certain the SPDisplayRelatedInfo function is working as I am getting a Firebug error: 'TypeError: findFormField(...) is undefined' on the pages that use this function.
If you already know of this and is on the work stack, then please accept my apologies else if there's any further light I can shed, then please shout out.
I'm now back to rocking in my chair mumbling : "It was all working so nicely!"
Comments: For the record, the issue was that I was trying to find a "simple" dropdown using the column comment to handle SharePoint 2010 with the December CU. The error was thrown when the column was not in the page. Split the logic out into it's own section to handle undefined cases: ``` javascript // Last ditch effort // Simple, finding based on the comment text at the top of the td.ms-formbody where the select's title begins with DisplayName - needed for required columns where title="DisplayName Required Field" // Example: SP2010 <select name="ctl00$m$g_308135f8_3f59_4d67_b5f8_c26776c498b7$ff51$ctl00$Lookup" id="ctl00_m_g_308135f8_3f59_4d67_b5f8_c26776c498b7_ff51_ctl00_Lookup" title="Region Required Field"> if (columnObj.Type === null) { var fieldContainer = findFormField(opt.displayName); if (fieldContainer !== undefined) { var fieldSelect = fieldContainer.find("select[title^='" + opt.displayName + "'][id$='$Lookup']"); if (fieldSelect && fieldSelect.length === 1) { columnObj.Type = dropdownType.simple; columnObj.Obj = fieldSelect; } } } ```