Created
July 16, 2015 13:08
-
-
Save cmourizard/fc64220d946d23f5f1ce to your computer and use it in GitHub Desktop.
Sugar 7 - Force auto populate without the confirm box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add fields in the mapping | |
$dictionary['Contact']['fields']['account_name']['populate_list']['team_id'] = 'team_id'; | |
$dictionary['Contact']['fields']['account_name']['populate_list']['team_name'] = 'team_name'; | |
$dictionary['Contact']['fields']['account_name']['populate_list']['team_set_id'] = 'team_set_id'; | |
// Force the auto populate without the confirm box | |
$dictionary['Contact']['fields']['account_name']['auto_populate'] = true; | |
// Or add your custom alert mersssage | |
$dictionary['Contact']['fields']['account_name']['populate_confirm_label'] = 'TPL_AUTO_POPULATE_CUSTOM_LABEL'; | |
// It's an Handlebar template, you can use some variables if you want: | |
// * {{moduleSingularLower}} : name of the module | |
// * {{values}} : list of the names of the fields |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment