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.

How to limit the number of lines in an iframe for a user

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
kknm
Posts: 377
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

How to limit the number of lines in an iframe for a user

Unread post by kknm »

How to limit the number of lines in an iframe for a user ?
kev1n
nuBuilder Team
Posts: 4562
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:

Re: How to limit the number of lines in an iframe for a user

Unread post by kev1n »

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

Re: How to limit the number of lines in an iframe for a user

Unread post by kknm »

No, no ... There are 4 subforms-iframes on the main form.
 In the first subform, the readings of 6 sensors are entered in one line. On the other subforms, the difference of readings is 2-1,4-2,6-4 from the first subform, which are used for other calculations of your subform. I need to enter a single line on the first subform and prohibit further input on This subform.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: How to limit the number of lines in an iframe for a user

Unread post by admin »

kkm,

Can you show a screenshot?


Steven
kev1n
nuBuilder Team
Posts: 4562
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:

Re: How to limit the number of lines in an iframe for a user

Unread post by kev1n »

I wasn't aware that you were talking about a subform...

To limit the number of rows in a subform, use this code in the beforeinsertrow event.

Code: Select all

if(nuSubformObject('sfObjID').rows.length = 1){nuCancel = true;}
Replace sfObjID with your Subform Object ID.

https://wiki.nubuilder.cloud/ ... ustom_Code
kknm
Posts: 377
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: How to limit the number of lines in an iframe for a user

Unread post by kknm »

kev1n wrote:I wasn't aware that you were talking about a subform...

To limit the number of rows in a subform, use this code in the beforeinsertrow event.

Code: Select all

if(nuSubformObject('sfObjID').rows.length = 1){nuCancel = true;}
Replace sfObjID with your Subform Object ID.

https://wiki.nubuilder.cloud/ ... ustom_Code
Where to find the event - beforeinsertrow?
kev1n
nuBuilder Team
Posts: 4562
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:

Re: How to limit the number of lines in an iframe for a user

Unread post by kev1n »

Double-click the label of your subform. Then switch to the tab "Custom Code"
kknm
Posts: 377
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: How to limit the number of lines in an iframe for a user

Unread post by kknm »

kev1n wrote:Double-click the label of your subform. Then switch to the tab "Custom Code"
Thanks !
Post Reply