inherit
169267
0
Nov 25, 2024 15:26:25 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Mar 27, 2023 6:03:03 GMT -8
How can I get the loop to loop 4 times only? Also only have the UI section only ask 4 times? Thanks in advance.
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Mar 27, 2023 7:15:17 GMT -8
How can I get the loop to loop 4 times only? Also only have the UI section only ask 4 times? Thanks in advance. Can we have a forum URL? Also, can you be more descriptive in what you're asking for / attempting to do?
|
|
inherit
169267
0
Nov 25, 2024 15:26:25 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Mar 27, 2023 9:06:11 GMT -8
Test forumKamiI have if (I===4){ break} and that seems to do the trick for the code but how can I get the UI of setup to only produce 4 slots.
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Mar 27, 2023 11:08:46 GMT -8
Test forumKami I have if (I===4){ break} and that seems to do the trick for the code but how can I get the UI of setup to only produce 4 slots. I am... still not entirely sure what any of this means, I apologise. (I===4)( break) is not proper template syntax, so I'm not totally sure what this is referring to. The only thing I can think of that involves 'loops' would be a foreach loop in the template, but it doesn't look like it'll be applicable here. Sorry, to be more specific, can you answer the following questions: - What does "loop" mean to you? - What "UI" are you referring to, and where is it located? - What is the purpose of the UI that you are displaying? - What is the UI "asking"?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Mar 27, 2023 11:47:16 GMT -8
Mike , if you're referring to the plugin installed on that forum you linked, I see you have a for loop iterating over the input data for that plugin and building articles. I am guessing you mean to limit the maximum number of displayed articles to four, even if someone inputs more than four articles into the plugin, which is why you have the line if(e===4) {break;}. The autoform automatically creates a new entry set each time no blank ones are left so you can go on forever. If you wish to limit the input of articles to only four sets within the plugin settings, you may opt not to use the autoform and add four sets of the entry fields for each article directly and not in an autoform.
|
|
inherit
169267
0
Nov 25, 2024 15:26:25 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Mar 27, 2023 17:45:53 GMT -8
|
|