Adding Extra Edit Buttons and working with 'Selected Check-Boxes' on Main List

Adding Extra Edit Buttons and working with 'Selected Check-Boxes' on Main List

Adding Extra Edit Buttons and working with 'Selected Check-Boxes' on Main List
divider

This article discusses how to Add extra Edit buttons to your main form.

1) Browse to the file "includes/nxt/scripts/list.js", open up list.js in Dreamweaver and add the following code below the line that reads //configuration variables

//configuration variables
// additional function to enable links to secondary forms in the list
   function Secondary_Edit_Form(elem, page_url) {
   var form = utility.dom.getParentByTagName(elem, 'FORM');
   this.page_url = page_url; // that’s the "variable link" - part
   nxt_list_edit_link_base(form, page_url);
   }

2) Save and close the file

3) Now open up your ADDT List form in Split View, click on the original Edit button and add the following code to the end of the Edit button code (update the items in Red to use your actual values):

<a class="KT_edit_op_link" href="#" onclick="Secondary_Edit_Form(this,'tickets_qe_sel.cfm'); return false;">Quick Edit</a> <a class="KT_edit_op_link" href="#" onclick="Secondary_Edit_Form(this,'tickets_map_sel.cfm'); return false;">Map Selected</a>
<a class="KT_edit_op_link" href="#" onclick="Secondary_Edit_Form(this,'tickets_map_sel2.cfm'); return false;">Map w/StreetView</a>

4) You can add as many Edit buttons as needed, just duplicate the code above. (I have added three buttons in my example)

In Summary, the new Edit Buttons take on the same CSS looks like the original Edit button, and function exactly as the original, including only those records that are Filtered &/or Selected will be passed on to your custom Detail Page(s).

Note: I created my custom Detail pages using the Create Dynamic Form Wizard.

Design View

Written by:  - 28 Apr, 2011