Make field read only

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
bescott53

Re: Make field read only

Post by bescott53 » 2018-07-06 15:22

agh gimblefritz, it is true.......

bescott53

Re: Make field read only

Post by bescott53 » 2018-07-06 18:31

gimblefritz & pbottcher, its ok i have amended slightly to this

Code: Select all

/* current user is not an admin? */
             if($memberInfo['group'] != 'Admins'){
                    $html .= <<<EOC
                                        <script>
                                              \$j(function(){
                                              \$j('#approvedby_so').select2('readonly', true)
                                              })
                                        </script>
EOC;
             }

this works perfectly and does not remove any data that was previously stored in the field.

Post Reply