hide object

Questions related to customising nuBuilder Forte with Javascript or PHP.

hide object

Unread postby johan » Thu Mar 14, 2019 4:09 am

Hi

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

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

Re: hide object

Unread 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'); });
}
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
 
Posts: 468
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland
nuBuilder Version: 4.5

Re: hide object

Unread 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: 3427
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5

Re: hide object

Unread postby johan » Thu Mar 14, 2019 2:48 pm

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

Re: hide object

Unread postby admin » Fri Mar 15, 2019 7:38 am

.
admin
Site Admin
 
Posts: 3427
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 7 guests