Andy Jarrett // Code. Develop. Create.

Next and previous buttons for flash forms

I've expanded a little on Ray Camdens post about next/previous buttons in Flash <cfform>'s. What this does is hides the previous button when the focus is on the first tab and removes the Next button on the last tab. <cfform id="frm" name="frm" method="post" action="#cgi.SCRIPT_NAME#" format="flash"> <cfformgroup type="tabnavigator" id="tabs"> <cfformgroup type="page" label="tab 1" id="_tab1"> </cfformgroup> <cfformgroup type="page" label="tab 2" id="_tab2"> </cfformgroup> <cfformgroup type="page" label="tab 3" id="_tab3"> </cfformgroup> </cfformgroup> <cfformgroup type="horizontal"> <cfinput type="button" name="btnPre" id="btnPre" value="Previous tab" onClick="tabs.selectedIndex=tabs.selectedIndex-1" visible="{(tabs.selectedIndex == 0)?false:true}"> <cfinput type="button" name="btnNxt" id="btnNxt" value="Next tab" onClick="tabs.selectedIndex=tabs.selectedIndex+1" visible="{(tabs.selectedIndex == 2)?false:true}"> </cfformgroup></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! ☕️