Choice field problem

Jul 7, 2009 at 1:44 AM

Hi,

I found two problem with choice field column.

1- When having a choice field with "Display as DropDown menu" option and NO default value, the form generator shows this field with the first value selected. I notice that there is no NONE value in Form Generator in this case. With the same list, the NewForm.aspx shows no selection for this field (Blank value).

2- When having a choice field with "Checkboxes (allow multiple selections)" option, default value and 7 differents choice value entered, the form generator shows this field with the first three checkbox checked. With the same list, the NewForm.aspx shows no checked at all for this field.

Thanks.

Apr 28, 2010 at 4:00 PM

I really like this code, but I have this problem too, and hopefully Alon can put this on the list of issues to fix. I'm using the form generator to let users provide website feedback, so I put the web part on the bottom of the home page. Unfortunately when there's already a value in a choice field, it puts the window focus on the field, meaning when a user browses to the site the browser scrolls down to the bottom of the page! So I can't use the web part until this is fixed. Thanks!

 

Jan 25, 2011 at 12:29 AM

Hi guys

I also love this solution.  I investigated and fixed this issue.  In the GenerateForm code, you would notice that the code states: formfield.ControlMode = SPControlMode.Edit.  You need to update this and change it to: formfield.ControlMode = SPControlMode.New.  

Hope this helps.

Cheers

Jul 15, 2011 at 3:03 PM
Edited Jul 15, 2011 at 3:03 PM

This didnt help me :-/ I have a similar problem:

I have one field that is "Issue #". This field is supposed to be autofilled with the unique form ID, using SPD workflow. However, With this form generator, I simply get "1,234" every single time as the auto generated ID number.The "Percent Complete" does the same. I'm seeing 123,456%. Also, much like the individuals above, I'm seeing a default value for the choice fields.

I've looked for the formfield.Control Mode = SPControlMode.Edit, and all I could find was the individual Form field controls. Example:

<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Issue_x0020__x0023_" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Issue_x0020__x0023_')}"/>
       <SharePoint:FieldDescription runat="server" id="ff1description{$Pos}" FieldName="Issue_x0020__x0023_" ControlMode="New"/>