I'm having problems with the visible attribute on the cfform tags.
visible="no" on :
cfgrid hides the grid, but leaves a blank spot the size of the grid.
cfinput, hides the control, but leaves the label. A labelless
cfinput leaves a blank spot.
cfformgroup does nothing at all.
This all stems from trying to hide some text fields that I'm using for
calculations and bindings to text displays in other tabs in a form.
The hidden type cfinput can't be used in actionscript, so I had to use a
text field. Unfortunately making text fields invisible leaves a gap as
I have noted above. The next thought was to put my "working fields"
onto a tab in the form which was disabled and invisible to the user.
Disabling a tab doesn't disable the tab, it actually only greys out all
of the form fields and, as I have already noted, the visible="no"
attribute doesn't make any difference to the display of the tab.
I would really like to be able to hide the my "working fields" tab in a
form I'm creating. I would also like to stop users from switching to the
next tab when they haven't completed certain fields.
Is either of these possible? Whats the deal with the visible
attribute? Am I misunderstanding how to use it?
Here's a much simplified example of the form I'm trying to build and the
problems I'm seeing with the visible attribute.
<cfquery name="GroupList" datasource="#request.ProductDSN#">
SELECT group_id, group_desc
FROM tblMat_Group
ORDER BY Sequence
</cfquery>
<html>
<head></head>
<body>
<cfform action="test.cfm" method="post" name="thisForm" preloader="no"
format="flash" height="200" width="400">
<cfformgroup type="tabnavigator">
<cfformgroup type="page" label="page 1">
<cfselect name="GroupID" label="Group" query="GroupList"
value="Group_ID" display="Group_Desc" queryPosition="below" height="20"
width="300" visible="false">
<option value="">Select one...</option>
</cfselect>
<cfinput type="button" name="button" value="Button"
onclick="{if(GroupID.visible==true) GroupID.visible=false; else
GroupID.visible=true;}">
</cfformgroup>
<cfformgroup type="page" label="page 2" visible="no"
enabled="no" id="page2">
<cfinput type="text" name="textbox" label="text field"
visible="true">
</cfformgroup>
</cfformgroup>
</cfform>
<cfoutput>#htmlcodeformat(thisForm)#</cfoutput>
</body>
</html>
Any help would be much appreciated.
Regards
Stephen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211973
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54