limit certain fields FIRST NAME to a single record and the others to unlimited.

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
pasbonte
Veteran Member
Posts: 162
Joined: 2013-02-06 09:49

limit certain fields FIRST NAME to a single record and the others to unlimited.

Post by pasbonte » 2018-06-21 17:24

Hello
I would like to limit certain fields FIRST NAME to a single record and the others to unlimited.
Let me explain: I enter my NAME, my FIRST and it is blocked, the other fields remaining open.
It's possible ?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: limit certain fields FIRST NAME to a single record and the others to unlimited.

Post by pbottcher » 2018-06-21 20:59

Hi,

yes this is possible. You can do it by adding the following code to the hooks/<tablename>-dv.js (which you might need to create)

Code: Select all

$j(function () {

  if ($j('#YOURFIELDNAME1').val() != '') $j('#YOURFIELDNAME1').prop('readonly', true);
  if ($j('#YOURFIELDNAME2').val() != '') $j('#YOURFIELDNAME2').prop('readonly', true);

});
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply