conditional hiding of a field in detail view

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
rob parsons
Posts: 8
Joined: 2014-10-31 20:11

conditional hiding of a field in detail view

Post by rob parsons » 2014-11-26 11:04

Hi

I have a detail view, which contains one field I want to hide when adding a record, but show when editing. can see how to use jquery to hide, but not sure how to detect when its an insert and when its an edit. any pointers?

Bertv
Veteran Member
Posts: 65
Joined: 2013-12-11 15:59

Re: conditional hiding of a field in detail view

Post by Bertv » 2014-11-26 13:33

For a new record the $data['selectedID'] is null. Maybe you can check this.
Bert
I am using Appgini 5.75

rob parsons
Posts: 8
Joined: 2014-10-31 20:11

Re: conditional hiding of a field in detail view

Post by rob parsons » 2014-11-26 18:41

thanks, however, i have now solved this using this in noble-dv.js in my hooks folder

var nobled = document.getElementById("nobled")
if(document.getElementById("target").value=="")
{
nobled.hide();

}

simple and it works!

Post Reply