hide object

Questions related to customising nuBuilder Forte with Javascript or PHP.

hide object

Postby johan » Thu Mar 14, 2019 4:09 am

Hi

How can I hide an object until the form is saved?

Johan
johan
 
Posts: 268
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: hide object

Postby Janusz » Thu Mar 14, 2019 5:12 am

Hi,
Not sure if this is what you are looking for, but for example I have additional save button which is hidden on edit form load.
When any field is modified it is getting visible - and after saving the record it is hidden again.
It is placed in the form Custome code JavaScript.
Code: Select all
nuHide('button_save');
$('#button_save').css("background", "red");


if (nuFormType() == 'edit') {
var inputs = $("#nuRECORD").find(":input:not([type=button])");
    inputs.change(function() {  nuShow('button_save'); });
}
Janusz
 
Posts: 199
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: hide object

Postby admin » Thu Mar 14, 2019 7:56 am

johan,

You could try this...

Code: Select all

if(nuCurrentProperties().record_id == '-1'){
    nuHide('bob');
}



Steven
admin
Site Admin
 
Posts: 3097
Joined: Mon Jun 15, 2009 9:53 am

Re: hide object

Postby johan » Thu Mar 14, 2019 2:48 pm

Thanks Steven, works perfect.
johan
 
Posts: 268
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: hide object

Postby admin » Fri Mar 15, 2019 7:38 am

.
admin
Site Admin
 
Posts: 3097
Joined: Mon Jun 15, 2009 9:53 am


Return to Custom Code