Note that there are some explanatory texts on larger screens.

plurals
  1. POSharepoint 2007: Create a multi-line text custom property for a custom field type?
    primarykey
    data
    text
    <p>I'm trying to extend the built-in Choice field type to include another piece of data: a correct answer. With this, users would be able to create their own tests directly within Sharepoint instead of having to use InfoPath or some other convoluted solution. I was hoping to just inherit the existing SPFieldChoice type and add one more custom property to hold an integer representing the correct answer from the choices entered.</p> <p>I've got a FieldTestQuestion class that inherits from SPFieldChoice along with a pretty basic TestQuestionFieldControl class inheriting from RadioButtonChoiceField. My fldtypes_TestQuestionField.xml file:</p> <pre><code> &lt;FieldTypes&gt; &lt;FieldType&gt; &lt;Field Name="TypeName"&gt;TestQuestion&lt;/Field&gt; &lt;Field Name="ParentType"&gt;Choice&lt;/Field&gt; &lt;Field Name="TypeDisplayName"&gt;Test Question (Multiple choice)&lt;/Field&gt; &lt;Field Name="TypeShortDescription"&gt;Test Question (Multiple choice)&lt;/Field&gt; &lt;Field Name="UserCreatable"&gt;TRUE&lt;/Field&gt; &lt;Field Name="ShowInColumnTemplateCreate"&gt;TRUE&lt;/Field&gt; &lt;Field Name="FieldTypeClass"&gt;MyCustomFieldTypes.FieldTestQuestion,MyCustomFieldTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=****&lt;/Field&gt; &lt;PropertySchema&gt; &lt;Fields&gt; &lt;Field Name="CorrectAnswer" DisplayName="Correct answer (line number)" Type="Integer"&gt; &lt;Default&gt;&lt;/Default&gt; &lt;/Field&gt; &lt;/Fields&gt; &lt;/PropertySchema&gt; &lt;/FieldType&gt; &lt;/FieldTypes&gt; </code></pre> <p>Unfortunately, this is what renders when I try adding a column of this type: <a href="http://www.mudman.us/stackoverflow/TestQuestionFieldCustomProperties.png" rel="nofollow noreferrer">My custom property http://www.mudman.us/stackoverflow/TestQuestionFieldCustomProperties.png</a></p> <p>No option to add the choices as with the Choice field type: <a href="http://www.mudman.us/stackoverflow/ChoiceFieldCustomProperties.png" rel="nofollow noreferrer">Custom multi-line text property on the built-in Choice field type http://www.mudman.us/stackoverflow/ChoiceFieldCustomProperties.png</a></p> <p>What do I need to put in my fldTypes_.xml to tell Sharepoint to either (a) use the existing custom properties for the Choice column and ADD the extra property I specified or (b) specifically define a multi-line text custom property?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload