Groups | Blog | Home
all groups > coldfusion flash integration > january 2007 >

coldfusion flash integration : Aligning cfformgroup (flash) controls



PamG
1/28/2007 12:15:02 AM
I wish I could attach a .jpg to this post; it would clarify what I'm trying to
say. Anyway, here's my problem. I'm creating a form with these basic
elements:

<cfform type="flash">

<cfformgroup type="page">

<cfformgroup type="horizontal"> [horizontal formgroup 1]
<cfselect> ... label="Variable Length Label A" ... </cfselect>
[form control 1 in horizontal formgroup 1]
<cfselect> ... label="Static Label 1" ... </cfselect> [form
control 2 in horizontal formgroup 1]
<cfselect> ... label="Static Label 2" ... </cfselect> [form
control 3 in horizontal formgroup 1]
</cfformgroup>

<cfformgroup type="horizontal"> [horizontal formgroup 2]
<cfselect> ... label="Variable Length Label B" ... </cfselect>
[form control 1 in horizontal formgroup 2]
<cfselect> ... label="Static Label 1" ... </cfselect> [form
control 2 in horizontal formgroup 2]
<cfselect> ... label="Static Label 2" ... </cfselect> [form
control 3 in horizontal formgroup 2]
</cfformgroup>

</cfformgroup>

</cfform>

I want the form controls in each of the horizontal formgroups to align with
each other, but they don't align because of the Variable Length Label in each
horizontal formgroup. I can send a snapshot to make this more clear to anyone
who might be able to help. Code is attached.

Thanks for any help you might be able to give.

------------------------------------------------



<cfformgroup type="page" label="Define Project Filters">

<!--- PROJECT NBR --->
<cfformgroup type="horizontal">
<cfparam name="form.project_oid_nbr" default="all">
<cfselect name="project_oid_nbr"
label="Project Nbr"
query="getMenuProject"
queryPosition="below"
value="project_oid_nbr"
display="display_desc"
size="3"
multiple="yes"
required="no"
selected="#form.project_oid_nbr#"
width="#projectFormWidthFull#"
tooltip="Multiple selections allowed">
<option value="all"
<cfif ListFind(form.project_oid_nbr,"all")>selected</cfif>
[quoted text, click to view]
</cfselect>
<cfformitem type="spacer" width="#spacer_width#"></cfformitem>
<cfparam name="form.column_order_project_oid_nbr" default="">
<cfselect name="column_order_project_oid_nbr"
label=""
query="get_column_order"
queryPosition="below"
value="column_nbr"
display="column_nbr"
multiple="no"
required="no"
selected="#form.column_order_project_oid_nbr#"
width="42">
<option value=""></option>
</cfselect>
<cfformitem type="spacer" width="#spacer_width#"></cfformitem>
<cfparam name="form.sort_order_project_oid_nbr" default="">
<cfselect name="rt_order_project_oid_nbr"
label=""
query="get_column_order"
queryPosition="below"
value="column_nbr"
display="column_nbr"
multiple="no"
required="no"
selected="#form.sort_order_project_oid_nbr#"
width="42">
<option value=""></option>
</cfselect>
</cfformgroup>

<!--- PROJECT NAME --->
<cfformgroup type="horizontal">
<cfparam name="form.project_nm" default="all">
<cfselect name="project_nm"
label="Project Name"
query="getMenuProject"
queryPosition="below"
value="project_oid_nbr"
display="display_desc"
size="3"
multiple="yes"
required="no"
selected="#form.project_nm#"
width="#projectFormWidthFull#"
tooltip="Multiple selections allowed">
<option value="all"
<cfif ListFind(form.project_nm,"all")>selected</cfif>
[quoted text, click to view]
</cfselect>
<cfformitem type="spacer" width="#spacer_width#"></cfformitem>
<cfparam name="form.column_order_project_nm" default="">
<cfselect name="column_order_project_nm"
label=""
query="get_column_order"
queryPosition="below"
value="column_nbr"
display="column_nbr"
multiple="no"
required="no"
selected="#form.column_order_project_nm#"
width="42">
<option value=""></option>
</cfselect>
<cfformitem type="spacer" width="#spacer_width#"></cfformitem>
<cfparam name="form.sort_order_project_nm" default="">
<cfselect name="rt_order_project_nm"
label=""
query="get_column_order"
queryPosition="below"
value="column_nbr"
display="column_nbr"
multiple="no"
required="no"
selected="#form.sort_order_project_nm#"
width="42">
<option value=""></option>
</cfselect>
</cfformgroup>
</cfformgroup>
The ScareCrow
1/31/2007 2:10:11 AM
You just need to rethink the layout.

Instead of

<cfformgroup type="horizontal">
</cfformgroup>

<cfformgroup type="horizontal">
</cfformgroup>


Try

<cfformgroup type="horizontal">

<cffromgroup type="vbox">
<cfselect> ... label="Variable Length Label A" ... </cfselect> [form control 1
in horizontal formgroup 1]
<cfselect> ... label="Variable Length Label B" ... </cfselect> [form control 1
in horizontal formgroup 2]
</cfformgroup>

<cffromgroup type="vbox">
<cfselect> ... label="Static Label 1" ... </cfselect> [form control 2 in
horizontal formgroup 1]
<cfselect> ... label="Static Label 1" ... </cfselect> [form control 2 in
horizontal formgroup 2]
</cfformgroup>

<cffromgroup type="vbox">
<cfselect> ... label="Static Label 2" ... </cfselect> [form control 3 in
horizontal formgroup 1]
<cfselect> ... label="Static Label 2" ... </cfselect> [form control 3 in
horizontal formgroup 2]
</cfformgroup>

</cfformgroup>

Ken

PamG
2/3/2007 11:53:59 PM
AddThis Social Bookmark Button