Okay, we know you can add a dropdown for a custom field to the massupdate subpanel by ticking the massupdate checkbox in the custom field editor (though it proabably wont update=) and we know you can add a sugar field to the massupdate subpanel by setting ('massupdate' => false, or 'massupdate' => 1) in the module's vardefs -- IF it is type enum, but untill now no one has offered a means by which to massupdate NON-DROPDOWN fields, SO HERE IT IS.
While, without a risky and major re-write of some really tricky code, you can't add non-dropdown fields to the Sugar massupdate sub-panel, you CAN -- pretty easily -- add your own massupdate fields -- of ANY TYPE -- at the end of your modules ListView.html. ...at least in Sugar OS 4.0.x
Example:
In contacts/vardefs I have added two "custom" feilds ('cycle', and 'gag'[Grip and Grin], but OEM sugar fields should work as well.
Notice the type, and the complete absense of any massupdate or options strings.
vardefs.phpListView.htmlPHP Code:'cycle' =>
array (
'name' => 'cycle',
'vname' => 'LBL_CYCLE',
'type' => 'int',
'isnull' => 'false',
'default_value' => '0',
),
'gag' =>
array (
'name' => 'gag',
'vname' => 'LBL_GAG',
'type' => 'bool',
'dbType' => 'varchar',
'len' => '3',
'default' => '0',
),
The addidion of the "Update" button is redundant, as the button in the subpanel will update these fields as well, but I added it in this case, changing the button value to 'Update GAG/Cycle' in an effort to save on user confusion (otherwise not obvious that your added update fields [outside the sub-panel] are also massupdate fields)HTML Code:<!-- END: row --> {PAGINATION} </table> <table cellpadding='0' cellspacing='0' border='0' width='100%'> <tr> <td style='padding-bottom: 2px;'> <input type='submit' name='Update' value='Update GAG/Cycle' class='button'> {MOD.LBL_CYCLE} <input type="text" size="1" id="mass_cycle" name="cycle"> {MOD.LBL_GAG} <input type="checkbox" size="1" value="1" id="mass_gag" name="gag"> </td> </tr> </table>


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks