Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

hide object

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Locked
johan
Posts: 422
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

hide object

Unread post by johan »

Hi

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

Johan
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 11 times
Been thanked: 18 times

Re: hide object

Unread post by Janusz »

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
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: hide object

Unread post by admin »

johan,

You could try this...

Code: Select all


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

Steven
johan
Posts: 422
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium
Been thanked: 3 times

Re: hide object

Unread post by johan »

Thanks Steven, works perfect.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: hide object

Unread post by admin »

.
Locked