Error: The Form must have form items with the same number of constraint columns

Error: The Form must have form items with the same number of constraint columns

Problem:
Form and Form Items use constraint rows and constraint columns to layout the form labels and form elements. When there are conflicting layouts this error is seen. Usually it is when one form item skin class is set to a horizontal layout (or not set) and another form item is set to a vertical or stacked layout.

Solution:
Use the same type of layout skin class in all the form items in your form.

// Does not work
// Notice the skinClass (when not set the form item uses FormItemSkin)

		<s:FormItem width="100%" label="First Name"
					skinClass="FormItemSkin">
			<s:TextInput  />
		</s:FormItem>

		<s:FormItem width="100%" label="Last Name"
					skinClass="StackedFormItemSkin">
			<s:TextInput  />
		</s:FormItem>

// Works

		<s:FormItem width="100%" label="First Name"
					skinClass="myStackedFormItemSkin">
			<s:TextInput  />
		</s:FormItem>

		<s:FormItem width="100%" label="Last Name"
					skinClass="myStackedFormItemSkin">
			<s:TextInput  />
		</s:FormItem>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s