Repeater Field

10 posts by 4 authors in: Forums > CMS Builder
Last Post: Yesterday at 7:19pm   (RSS)

Hello Interactive tools, i was wondering how would it be possible to have a Repeater Field similar ACF(https://www.advancedcustomfields.com/resources/repeater/),

this is would be very useful for adding functionality such as FAQ, Tabs, Sliders etc.. at the time being you would have to create a multi record  for faq as example and assign each question to a separate section probably called faq category and then add that to 3rd section that is used for pages

By jasmar222 - January 14 - edited: January 14

+10

a life-long dream of mine as well.

Hey all, 

Great suggestion.  We'll put that on the list and look into how to implement it.

Dave Edis - Senior Developer
interactivetools.com

Are we there yet?!!??  ;-)

I realize it's a recent request. I do not expect it immediately of course...just submitting my approval for a GREAT request! 

Hi Codee, 

We're busy working on the next release, which is probably 1-2 weeks out before the beta, but can revisit repeater fields in the future.

Can you give me an example use case?  How you'd actually be using it.  e.g., What's a real-world example of some fields you'd be repeating? 

Dave Edis - Senior Developer
interactivetools.com

Hi Codee, 

We're busy working on the next release, which is probably 1-2 weeks out before the beta, but can revisit repeater fields in the future.

Can you give me an example use case?  How you'd actually be using it.  e.g., What's a real-world example of some fields you'd be repeating? 

Dave Edis - Senior Developer
interactivetools.com

Hi Dave, In my case the following applies.

Fields I repeat in multiple sections of every site I build (sometimes more than 3 of each such as for a classic car site, pets, etc. but you get the point...fields constantly retyping cmsb fields and php code for over and over):

* YouTube video Id fields:

[YT_ID1]…[YT_ID2]… 3, etc..   In this text field the user simply enters the youtube id such as "EZZfRJAF9W8" for the video they want to appear on the page and [yt_video_text2 ] for any custom title text for that video.

On the html page I have, as a partial example for the field YT_ID2:

                                                <div class="video-container">

                                                            <div class="youtube-player" data-id="<?php echo ($record['yt_id2']) ?>" title="RV video about <?php echo $record['yt_video_text2'] ?>" alt="RV video about <?php echo $record['yt_video_text2'] ?>"></div>

                                                </div>

* On nearly every page, in every section, of every site I build I include fields for targeted keywords and social media tags, such as:

Keyword 1, Keyword 2,Keyword 3 and SocialMedia 1, SocialMedia 2, SocialMedia 3, etc. 

these are text fields that get specific placement within the build of each page so they are caught and read by the search engines and may appear via the following html:

<?php if ($faqsRecord['keyword_1']): ?> - <?php echo htmlencode ($faqsRecord['keyword_1']) ?><?php endif ?>

<div class="socialmedia">

                        <?php if ($genfaqsRecord['social_media_1']): ?>                                                                                                                           

                                    <span class="socialmediatext">#<?php echo htmlencode ($genfaqsRecord['social_media_1']) ?>

                                    </span>

                        <?php endif ?>

                        <?php if ($genfaqsRecord['social_media_2']): ?>                                                                                                                           

                                    <span class="socialmediatext">#<?php echo htmlencode ($genfaqsRecord['social_media_2']) ?>

                                    </span>

                        <?php endif ?>

                        <?php if ($genfaqsRecord['social_media_3']): ?>                                                                                                                           

                                    <span class="socialmediatext">#<?php echo htmlencode ($genfaqsRecord['social_media_3']) ?>

                                    </span>

                        <?php endif ?>

            </div>

*In many sections, especially FAQs, I put a section for "related information" in case the user wants to display relevant related information to the topic either within or without their website.  The fields I use are related_1 with related_1_url:

<!--begin related information area-->

            <?php if ($genfaqsRecord['related_1']): ?>

                        <div class="ifinterested">Additional Information...

                        </div>

                        <div class="inversebox">

                                    <?php if ($genfaqsRecord['related_1']): ?>

                                                <a href="<?php echo htmlencode($genfaqsRecord['related_1_url']) ?>" target="_blank">

                                                            <div class="tinbox">

                                                                        <?php echo htmlencode($genfaqsRecord['related_1']) ?>

                                                            </div>

                                                </a>

                                    <?php endif ?>

                                    <?php if ($genfaqsRecord['related_2']): ?>

                                                <a href="<?php echo htmlencode($genfaqsRecord['related_2_url']) ?>" target="_blank">

                                                            <div class="tinbox">                    

                                                                        <?php echo htmlencode($genfaqsRecord['related_2']) ?>

                                                            </div>                                               

                                                </a>

                                    <?php endif ?>

                                    <?php if ($genfaqsRecord['related_3']): ?>

                                                <a href="<?php echo htmlencode($genfaqsRecord['related_3_url']) ?>" target="_blank">

                                                            <div class="tinbox">

                                                                        <?php echo htmlencode($genfaqsRecord['related_3']) ?>

                                                            </div>

                                                </a>

                                    <?php endif ?>

                                    <div class="centered"><span class="relatedinfo">[links open in a new window]</span></div>

                        </div>

            <?php endif ?>

<!--end related information area-->

Staff bios: name, title, bio, photo, linkedin profile

faqs: question, answer, tags

sliders: photo, headline, text, link

feature block: photo, icon, text, link

Drag sort order would suffice, though being able to order by a particular field would be nice  

Forcing min/max entries would also be nice to have

An additional field (that I can't believe I overlooked) is a list field for colors that can be applied to fonts, backgrounds, etc. as a dropdown.  For example, one client's list of colors - used with multiple fields in the same cmsb section, and used in nearly every cmsb section for that site is:

FFFFFF|white
000000|black
D60034|cluff red
ED6E77|aged red
FF0000|red
800000|deep maroon
E6E6E6|very light grey
C0C0C0|light grey
202020|dark gray
808080|smoke gray
404040|charcoal
FFF8DC|corn silk
A3D3FF|light blue
BD80BE|light pink
FE8A8A|light coral
FFC4AD|very light salmon
F5DEB3|wheat
DEB887|burlywood
D2B48C|tan
FFEFCF|faint sandy
F5B151|deep sand
F5B937|matte gold
94287E|warm purple
D8BFD8|thistle
E6E6FA|lavender

So, a repeater field would seem to be a great idea to avoid recreating this 20+ times on a site.  Maybe there is another way to do this: If there was a place to put the master list of color choices one time, and be able to reference that list (related record?)...but it seems a repeater field for this may be most appropriate.  Am I thinking correctly with repeater fields?