Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Hide column if form = iframe

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Hide column if form = iframe

Unread post by kev1n »

kknm wrote: I am confused by the warnings in Settings - Title.
The errors can be ignored, the code is perfectly fine. The parser just gets confused because a closing tag is found the beginning of the code.
kknm wrote:There was an unpleasant moment for viewing the iframe - the bottom scroll appeared.
What do you mean by that? Would you mind sharing a screenshot of what you see?
kknm wrote:And I would also like to remove the search field and buttons in this row in iframe mode.
Add $('#nuActionHolder').remove(); to your existing code:

Code: Select all

if (iniFrame()) {
    $(function () {
        hideBrowseColumn(0); // Hide the first column
         $('#nuActionHolder').remove();  // Hide the search field, buttons
    });
}

kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

I was mistaken, not only the bottom scroll, but the right one also appeared, which was not in the cloned forms. As I understand it, the form after hiding the column did not change its size.
scrol.PNG
order.PNG
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Hide column if form = iframe

Unread post by kev1n »

Try changing the body height like this. You need to figure out somehow the correct value and replace 200px with your height.

Code: Select all

if (iniFrame()) {
    $(function () {
        hideBrowseColumn(0); // Hide the first column
         $('#nuActionHolder').remove();  // Hide the search field, buttons
         $('body').css('height', '200px'); // reduce the body height
    });
}
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

Horizontal scrolls are simply hidden by the adjacent iframe, which was not observed in cloned forms. The width of the iframe includes the size of the hidden column. It seems to me not to hide it, but to make the width = 0
That is not the problem. In cloned forms there was a limit on the number of lines, which I cannot allow in edit mode.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

Please repeat the script fragment to set the column width = 0
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Hide column if form = iframe

Unread post by kev1n »

kknm wrote:Please repeat the script fragment to set the column width = 0
What do you mean by that?
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

The original script that you edited while I checked. I wrote to you earlier about this.
While writing your answer, you changed the function, I was even scared.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

kev1n wrote:
kknm wrote:Please repeat the script fragment to set the column width = 0
What do you mean by that?
Kevin help.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Hide column if form = iframe

Unread post by kev1n »

I don't understand where you need help
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Hide column if form = iframe

Unread post by kknm »

kev1n wrote:I don't understand where you need help
When hideBrowseColumn (0); Iframe is not reduced by the width of the hidden column and the bottom scroll is visible. It is impossible to achieve a lack of scrolling by reducing the width of the iframe.
But if you apply a cloned shape with a column width = 0, iframe shows without a bottom scroll.
Tell me how to make the column width = 0 in the iframe.
Post Reply