Search found 28 matches

by dannybridi
2019-04-11 16:25
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

... and how did you insert the screenshot in the post Jan? :D I can't seem to manage.
by dannybridi
2019-04-11 16:23
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

All resolved! After reading your reply googling and playing around, I managed to resolve everything by using the following: $j('#Field1').prop('readonly', 'readonly'); /* input fields */ $j("#Field2").attr('disabled',true); /* check boxes */ setTimeout('$j("#s2id_Field3-container").select2("readonly...
by dannybridi
2019-04-10 08:19
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Thanks Jan,
I have a very stupid and ignorant question :D :
Where should the output of the console.log() appear? I don't see it when I refresh the browser.
Thanks
by dannybridi
2019-04-09 08:03
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi, I use Chrome and Edge. The code screenshot is from Notepad++. You can download the screenshots from here: https://www.dropbox.com/s/y0wjn6u6l9vn8xg/shot1.jpg?dl=0 Screenshot from Notepad++ showing the two lines that do no t work (countrykey and Gender); https://www.dropbox.com/s/8wqb7tjamepbwvf/...
by dannybridi
2019-04-08 08:24
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi, My Participants table has the following two fields: countrykey which calls on a lookup table; and Gender which allows a selection between Male and Female (not lookup) So I added the following, but they both don't work: $j("#countrykey-container").attr('disabled',true); $j("#Gender-container").at...
by dannybridi
2019-04-07 20:59
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Ok. Now that this is fixed for input fields, how can I do it also for dropdowns and checkboxes? :D
by dannybridi
2019-04-07 19:39
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Eureka!!!

Thank you so much. Works now!

Much appreciated.
by dannybridi
2019-04-07 17:02
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi, So, some progress! Removing the two tabs removed the parsing error. I tried however all variations of .prop .attr above and also the other code, but in all cases, the field is read only, but also for the Admins group! I'm logged in to the project using different browsers, one with a normal user ...
by dannybridi
2019-04-07 14:19
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi. I restored to the original code: function Participants_dv($selectedID, $memberInfo, &$html, &$args){ if($mi['group'] != 'Admins'){ $html.=<<<EOC <script> \$j(function(){ \$j('#Email').prop('readonly', 'readonly'); }) </script> EOC; } } I would like to share a screenshot from Notepadd++, but don'...
by dannybridi
2019-04-07 13:47
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi, Thanks. At the moment, however all I get is the parsing error: Parse error: syntax error, unexpected '<<' (T_SL) in /................/hooks/Participants.php on line 182 I tried to simplify the code onto one line: function Participants_dv($selectedID, $memberInfo, &$html, &$args){if($mi['group'] ...
by dannybridi
2019-04-07 12:32
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi, I have table called Participants with several fields that I'd like to make read only, but only to a group of users called Registrars. So, when a user in the Registrars group logs in, he/she should be able to see these fields in read only mode and not be able to modify their content. Whereas, if ...
by dannybridi
2019-04-06 21:17
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Re: Readonly, but not for a specific group

Hi pböttcher, Thanks for the reply. No, this would not be for one field only, but for many. And they don't have to be set to read only from the console. It would be more convenient though. I tried following some of the posts on this issue, but the proposed solutions didn't work for me. Not sure why....
by dannybridi
2019-04-06 16:41
Forum: Advanced Customizations > Hooks
Topic: Readonly, but not for a specific group
Replies: 25
Views: 253

Readonly, but not for a specific group

Hi,
I'd like to be able to set a field to Read Only (in the AppGini Console), but still allow members of the Admins (and/or other groups) to edit that same field. I have searched for solutions in this forum, but none seems to work (for me at least). Is there a definitive way for doing this?
Thanks
by dannybridi
2019-02-15 19:45
Forum: Advanced Customizations > Hooks
Topic: How to produce a pop up message based on a test in a hook script
Replies: 2
Views: 336

How to produce a pop up message based on a test in a hook script

Hi,

I'd like test for a condition in a table's hook file before_insert and/or before_update functions and accordingly display a pop (modal) message to the user. How can I do that?

Your help would be appreciated.

Thanks
by dannybridi
2019-02-11 10:09
Forum: Bugs/annoyances
Topic: Error when generating project with 5.73/5,74
Replies: 3
Views: 202

Re: Error when generating project with 5.73/5,74

Update,
The PHP version is 7.0.33
Thanks
by dannybridi
2019-02-11 07:28
Forum: Bugs/annoyances
Topic: Error when generating project with 5.73/5,74
Replies: 3
Views: 202

Re: Error when generating project with 5.73/5,74

Hello peebee,

Thanks for your reply. My hosting server's cPanel says PHP version 7.0.33, but phpMyAdmin says PHP version 5.6.30.

Thanks for your help
by dannybridi
2019-02-10 22:08
Forum: Bugs/annoyances
Topic: Error when generating project with 5.73/5,74
Replies: 3
Views: 202

Error when generating project with 5.73/5,74

Hello, I have been using ver 5.62 without issues. I downloaded and installed the latest version 5.74, but when I regenerate the project, I get a 500 error. The PHP error log file error_log shows the following: [09-Feb-2019 14:45:34] PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ')'...
by dannybridi
2018-04-19 17:09
Forum: Advanced Customizations > Hooks
Topic: Read-only field for a group
Replies: 3
Views: 970

Re: Read-only field for a group

Thank you Tammam and pböttcher for your help. I will test and will report back.
by dannybridi
2018-04-11 15:29
Forum: Advanced Customizations > Hooks
Topic: Read-only field for a group
Replies: 3
Views: 970

Read-only field for a group

Hello, I have successfully used the following code in tablename-dv.js to make a field read only: document.getElementById("fieldname").readOnly = true; I’d like to make this functionally dependent on the group membership of a logged in user. Or, make the field read only for all users, except for for ...
by dannybridi
2018-02-01 02:07
Forum: Advanced Customizations > Hooks
Topic: Unable to do a calculation
Replies: 34
Views: 16263

Re: Unable to do a calculation

Thanks Tammam,
It seems to work in the before update hook function.
by dannybridi
2018-02-01 02:03
Forum: Advanced Customizations > Hooks
Topic: Introduce a visual break between fields in detail view
Replies: 6
Views: 1638

Re: Introduce a visual break between fields in detail view

Sorry Tammam,
Where exactly should I add this code?
Thanks for your help.