Welcome to the nuBuilder Forums!

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

ContentBox element, to hold dynamically swappable objects/element

Questions related to using nuBuilder Forte.
Post Reply
Uzlander
Posts: 36
Joined: Sat Jul 08, 2023 10:21 am
Has thanked: 1 time
Been thanked: 2 times

ContentBox element, to hold dynamically swappable objects/element

Unread post by Uzlander »

I was thinking about how useful it would be to have some Tabbed Container to hold several elements (tables in my mind) in limited area of a form.
Now looking at existing ContentBox available i'm getting curious if there's a way to use it as some substisute (or workaround) for TabbedContainer in mind.
Say, place a button on top of the ContentBox which initially contains one subform (or ideally regular browse/edit form in an iframe, cos it presents convenient forms when adding/editing record), conventionally titled 'INCOMING'.
Upon pressed the button above changes its title to 'OUTGOING' and the ContentBox swaps its content for another corresponding subform. Thus we have (at least) two dynamically changing elements on a single space.
So is there a way to make this happen or it maybe an iframe that dynamically swaps its inners ..?
Cryuing for help,
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: ContentBox element, to hold dynamically swappable objects/element

Unread post by steven »

Uzlander,

A nuBuilder Edit Form IS a tabbed container

and via a Run Object, you can add other Edit Forms (tabbed containers) inside that Edit Form.

But, obviously, the more you try to add to any one web page, the slower it will get.


Steven
A short post is a good post.
uzlander_ya
Posts: 5
Joined: Thu Apr 24, 2025 8:00 pm
Has thanked: 2 times

Re: ContentBox element, to hold dynamically swappable objects/element

Unread post by uzlander_ya »

Got it, thank you sir. To make things less complicated another strategy appeared, and question too:
Attempting to separate (form)UI into tabs i want a couple of elements(simple objects) just mirrored from tab1 (read only) always shown above in well visible place. As those are essential, place them above and outside the tab set (screenshot attached). Should i want to edit any, i go to respetive tab, find and edit it. Is that somehow possible ?
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: ContentBox element, to hold dynamically swappable objects/element

Unread post by kev1n »

You can append custom html after the Save button, e.g.:

Code: Select all

$('#nuActionHolder').append(
  $('<div>', {
    css: {
      marginTop: '10px',
      marginLeft: '10px'
    }
  }).append(
    $('<b>').text('Date'), ': ', $('<span>', { id: 'date_field' }), ' ',
    $('<b>').text('Rate field'), ': ', $('<span>', { id: 'rate_field' })
  )
);

To update the date, call e.g.

Code: Select all

 $('#date_field').html('2025-05-11');
The additional "labels" can be updated when the form is loaded. If the content of an element changes, the labels can be updated accordingly as well
Post Reply