Andy Jarrett // Code. Develop. Create.

Deleting tabs in CFFORM

I've been on a quest to find out how to show/hide/generate tabs in <cfform> based on selected options (which I still cannot do, so if you know please post in the comments). But on my journey I have discovered how to completely remove (delete) a tab and thought it might be usful to others. <cfsavecontent variable="del"> tabs.destroyChildAt(1);</cfsavecontent><cfform id="form1" name="form1" method="post" action="#cgi.SCRIPT_NAME#" format="flash" skin="haloGreen"> <cfformgroup type="tabnavigator" id="tabs"> <cfformgroup type="page" label="Tab1"> </cfformgroup> <cfformgroup type="page" label="Tab2"> </cfformgroup> <cfformgroup type="page" label="Tab3"> </cfformgroup> </cfformgroup> <cfinput type="button" id="btnTab1" name="btnTab1" value="Remove tag" onclick="#del#"></cfform>

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️