Jump to content

Search the Community

Showing results for tags 'repeater'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hello I've just hit a scenario where I have a particular field (within a repeater) that I'd like to set up a field dependency for, so that it shows only if an option from a page reference field (that sits outside of the repeater) is selected. Simply using the fieldname=value approach doesn't seem to work. I'm assuming that this is because the field in question is inside a repeater and can't access information from the fields that sit outside of it? I tried using the following without luck. To be honest I was just guessing at this point. page.fieldname=value forpage.fieldname=value There's other ways that I can set up my template, but I was just curious if there was missing a trick somewhere?
  2. Hi, Please find the screenshots attached. We have a repeater field on the test1 page. On the test2 page, we would like to select values of titles created in the test1 page. Please suggest. Thank you.
  3. Hi We need to validate the input fields of the repeater item in Process Wire Admin Page. Currently we can be able to show our custom error messages on page beginning and repeater item field beginning (Please find the attachment). How can we display our custom error messages below the input fields of the repeater item (Similar to Process Wire Error message). Please suggest?
  4. So I tried using $page->repeater->getRandom() in some template code but it didn't seem to work. Should this work? If not, what is the recommended way of working with a single, randomly-chosen repeater item? Thanks!
  5. emplate Field Widths Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template. Since v0.2.0 the module also adds a similar field to the settings of Edit Field for Repeater, FieldsetPage and Repeater Matrix allowing you to quickly set the widths of inputfields within the Repeater/FieldsetPage field, or within each Repeater Matrix type. Note: widths are only saved if the edit form is submitted with the "Field widths" field in an open (non-collapsed) state. Edit template Edit Field: Repeater Edit Field: Repeater Matrix Why? When setting up a new template/repeater or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process. Config options You can set the default presentation of the "Field widths" field to collapsed or open. Widths entered into the "Field widths" field are only applied if the edit form is submitted with the field in an open (non-collapsed) state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width. https://github.com/Toutouwai/TemplateFieldWidths https://modules.processwire.com/modules/template-field-widths/
  6. Hi everyone. As per the title, this is the scenario: I have a main page with a FieldtypeRepeater with 4/5 elements added, where each repeater are called in other pages (linked to the respective repeater by the id: so the pages are url based with their repeater items). Accidentally, the repeater items were deleted from repeater field on the main page. (I know what you're thinking... "Accidentally? How is that possible?" 🤣- But please, trust me 😨: I don't know how they are literally "disappeared" from the page...). Actually only the main page has lost someting (a selection based on the deleted repeater ids), but not the other pages. I suppose if I rebuild the deleted items in the main page from scratch, I will create a big mess in the other pages with the old repeaters and the newer ones. And deleting all the other pages to rebuild them with the new repeaters is not an option. I already checked in the admin tree and the repeaters are still in /admin/page/repeaters/for-field-XXX/for-page-XXXX/ Any ideas to "relink" those repeaters to the original main page (of course without losing original ids or recoding php templates and functions)? Is there any "magic" API? Many thanks in advance.🙏
  7. Hi all I have a text search based upon Ryans search template. Unfortunately, I can't make it work with Repeater Matrix fields inside repeaters. I have a repeater field called "content_sections" and inside, there's a repeater matrix field called "items". As I understand it, the selector for a textfield inside the repeater matrix should be: content_sections.items.textfield But this does not deliver any results at all. Any ideas anyone? Thanks Roli
  8. Hey guys, I'm having a hard time troubleshooting this one: my multilanguage fields save data outside repeaters, but inside any repeater they just won't save, unlike all other fieldtypes. What I've tried so far: Recreating the repeater matrix from scratch — problem persists Using multi-language fields on a regular repeater instead of a repeater matrix — problem persists Removing all language support modules and reinstalling — problem persists If I change the multi-language fields into single-language types, they start saving right, but if I change them back to multi-language, the problem persists. Changing the multilanguage field via API `$page->repeaterfield[0]->setAndSave("title","Meow")` — works, but I need it in the admin form To try to figure out the problem I did this: $wire->addHookAfter("Pages::saved(template=repeater_content)", function($event) { $page = $event->arguments(0); $changes = $event->arguments(1); $values = $event->arguments(2); bdb($page); bdb($changes); bdb($values); }); The hook is only triggered when I also change a non-multi-language field. On the dumped $page the title field is there like I changed it in the form. But something must happen after Page::saved that restores it back to what it was. Where would you look next to find the solution...? Thank you very much for your help!
  9. In a page’s admin interface, I need a select field to be populated with the values of another repeater that exist in the current page. To create such a reference, I tried to use Edit Field > Input > Custom Find, and Selector String. But I struggle to pass the “this page” reference. Ideally, I would like to find `$page->font_style`, `font_styles` being the repeater I want the values from. What am I missing?
  10. I'm just getting used to using repeaters in pages (yeah, I'm slow) but haven't been able to find out if they can be used as part of the InputfieldWrapper returned by getModuleConfigInputfields() for configurable modules. I suspect they can't but would be happy if I were wrong. Can anyone give a definitive answer?
  11. Hello, I found the following bug: If you have two or more different text fields on a page, which use the same CKEditor-custom-js-style-set and one of these text-fields is located in a repeater-field, the style-set doesn’t work anymore. Has anybody discovered this problem before?
  12. Hi all, Just wondering if anyone else has encountered this issue. During some work recently I have noticed that it seems like when you use count() on a repeating field to determine if theres any content to output, it works fine on a template but behind the scenes as part of a module it doesn't return the same results on the same data set. For instance. On the frontend template this outputs as you would imagine: Doing a count on that same field, from within a module I get count() returning as 2, which makes sense as both are enabled. However I noticed that, if I then disable one of the repeating items, ala: This is reflected in the frontend as you would imagine, like so: However within the module logic, the value of count() on the same data set will still return as 2 The fact that I can't rely on the count within the module being correct is having major knock on effects as I have no idea whether to trust any information brought back about that repeating field. Does anyone know a way to get a correct number from a repeating_field->count or count(repeating_field) from the API, that actually takes into account the enable/disabled status of the elements within it? I have tried using various methods which are fine on a page template but just seem unreliable in my modules context, for some clarity, this is how I am pulling out the same field via the module: $overrides = $this->pages->findOne("template=plot, parent.id="666", title=plot 101"); then the following to check if there any content within the repeater error_log('COUNT:'.count($overrides->key_features)); For the record the following also appears to be giving the same as above error_log('COUNT:'.$overrides->key_features->count); So presumably this is a bug or COUNT() works diffferently between use in templates and usage with the API? If its working as intended, can anyone point me towards some documentation that explains the differences? Any thoughts would be much appreciated?
  13. Hello I've created a repeater field and have tried to add it to a FieldsetPage field. I've noticed that when inside the FieldsetPage it doesn't allow the option to clone individual repeater items. (I had originally posted this in the ProFields support forum thinking that it was isolated to repeatermatrix fields but have since seen the same result with standard repeaters, so just posting here in case anyone else has any ideas) See below image that shows both scenarios (clone button highlighted red not showing when inside fieldsetPage field) I'm sure there's probably a reason for this that I'm just not aware of, but just thought I'd check if this is intentional or if I have just found a bit of a bug? Ideally, I'd like my client to be able to have the ability to clone items and plan to have quite a lot of repeater matrix types included here so thought I'd check as it may affect how I set up my templates. Thanks in advance for any help or suggestions.
  14. Repeater Easy Sort Adds a compact "easy-sort" mode to Repeater and Repeater Matrix, making those fields easier to sort when there are a large number of items. The module also enhances Repeater Matrix by allowing a colour to be set for each matrix type. This colour is used in the item headers and in the "add new" links, to help visually distinguish different matrix types in the inputfield. Screencasts A Repeater field A Repeater Matrix field with custom header colours Easy-sort mode There are two ways to enter easy-sort mode. 1. Click the double-arrow in a Repeater item header. This activates easy-sort mode and also highlights the item with a black background so it's easier to find it in easy-sort mode. 2. Click the horizontal ellipsis icon in the Repeater field header to activate easy-sort mode. To return to normal mode click the vertical ellipsis icon. While in easy-sort mode: The items will reduce in width so that more items can be shown on the screen at once. The minimum width is configurable in the field settings. Any items that were in an open state are collapsed, but when you exit easy-sort mode the previously open items will be reopened. You can drag an item left/right/up/down to sort it within the items. You can click an item header to open the item. An "Exit easy-sort mode" button appears at the bottom of the inputfield. Configuration In the field settings for Repeater and Repeater Matrix fields you can define a minimum width in pixels for items in easy-sort mode. While in easy-sort mode the items will be sized to neatly fill the available width on any screen size but will never be narrower than the width you set here. If desired you can enable easy-sort mode for a field by default. Since easy-sort is then the default mode for the field no "Exit easy-sort mode" button is shown. Use the mode buttons in the field header to change between easy-sort and normal mode when needed. In the field settings for Repeater Matrix you can define a custom header colour for each matrix type using an HTML "color" type input. The default colour for this type of input is black, so when black is selected in the input it means that no custom colour will be applied to the header. Exclusions The easy-sort mode is only possible on Repeater/Matrix fields that do not use the "item depth" option. https://github.com/Toutouwai/RepeaterEasySort https://processwire.com/modules/repeater-easy-sort/
  15. I have a front end form for creating new pages, repeater and repeater matrix field don't seem to save any data. I was considering handling the data manually but can't seem to get anything useful from the post data, are there any methods i can use?
  16. Afternoon, I have a page setup with a repeater which has 40 or so items in. Each repeater item has around 6 fields. This is becoming a little unusable so I'd like to convert them to child pages of the current parent. Is there a way to do this (import/export maybe?) Many thanks Pete
  17. Long time user and huge fan of PW, but this time I can't find an answer to my question this time: For my social media buttons, I have a Repeater field called var_link_web with two fields: one is for the URL, and the other is an Images field containing two images that are used as a background-image for a <div>, of which the second is the ':hover' version (although activated through JavaScript here). There are four instances of this Repeater, of which two are 'turned off'. I use the following PHP in my _main.php to call them, wrapped in <p><?php == ?></p>: $s_m_button = $variables->var_link_web; foreach($s_m_button as $button){ $button_image = $button->var_link_image->first->height(80); $button_image2 = $button->var_link_image->eq(1)->height(80); echo " <a href='$button->var_link_url'> <div class='image_link' style='background-image:url({$button_image->url})' onMouseOver='this.style.backgroundImage=url({$button_image2->url})' onMouseOut='this.style.backgroundImage=url({$button_image->url})'> </div> </a>"; }; ($variables leads to an unpublished page with several fields I want to have easy access to, and is defined in _init.php.) However, this gives me the following result: I have no idea where the extra <p>'s come from. The URL field has the 'HTML Entity Encoder' turned on. What's even weirder is that the HTML source file seemingly renders correctly: <p> <a href='https://www.facebook.com/'> <div class='image_link' style='background-image:url(/site/assets/files/1045/icons-facebook-square.0x80.png)' onMouseOver='this.style.backgroundImage="url(/site/assets/files/1045/icons-facebook-square2.0x80.png)"' onMouseOut='this.style.backgroundImage="url(/site/assets/files/1045/icons-facebook-square.0x80.png)"'> </div> </a> <a href='https://www.instagram.com/'> <div class='image_link' style='background-image:url(/site/assets/files/1046/icons-instagram-square.0x80.png)' onMouseOver='this.style.backgroundImage="url(/site/assets/files/1046/icons-instagram-square2.0x80.png)"' onMouseOut='this.style.backgroundImage="url(/site/assets/files/1046/icons-instagram-square.0x80.png)"'> </div> </a> </p> Removing the JavaScript has no effect. I'm probably missing something obvious, but am at a loss here. Thank you in advance!
  18. Hi, I'm facing the issue where i have a repeater field with a multi language textarea (german & english, german beeing default). In german more blocks should be displayed as in english. The textarea field is configured as inherit default language if blank (I don't want to change this since it is the wanted behaviour for all other pages...). Now I want to access the unformatted value of the textarea field in the repeater and only show it if it is not empty. Something like this: $body = ""; $page->of(false); foreach($page->blocks as $block){ //blocks is repeater field, each block has title and textarea if ($block->textarea->getLanguageValue($user->language)){ $body .= <<<EOD <div> <div class='uk-card uk-card-default uk-card-body'> <h3 class='uk-card-title'>$block->title</h3> $block->textarea </div> </div> EOD; } } $page->of(true); print $body; However this doesn't work: Call to a member function getLanguageValue() on string. I also tried the other syntax for getLanguageValue: $page->getLanguageValue($language, $field) But I didn't manage to get a unique name of the textarea field in the repeater. I looked into the API of FieltypeRepeater but couldn't find anyhting that fixed my issue. Any ideas?
  19. ProcessWire InputfieldRepeaterMatrixDuplicate Thanks to the great ProModule "RepeaterMatrix" I have the possibility to create complex repeater items. With it I have created a quite powerful page builder. Many different content modules, with many more possible design options. The RepeaterMatrix module supports the cloning of items, but only within the same page. Now I often have the case that very design-intensive pages and items are created. If you want to use a content module on a different page (e.g. in the same design), you have to rebuild each item manually every time. This module extends the commercial ProModule "RepeaterMatrix" by the function to duplicate repeater items from one page to another page. The condition is that the target field is the same matrix field from which the item is duplicated. This module is currently understood as proof of concept. There are a few limitations that need to be considered. The intention of the module is that this functionality is integrated into the core of RepeaterMatrix and does not require an extra module. Check out the screencast What the module can do Duplicate multible repeater items from one page to another No matter how complex the item is Full support for file and image fields Multilingual support Support of Min and Max settings Live synchronization of clipboard between multiple browser tabs. Copy an item and simply switch the browser tab to the target page and you will immediately see the past button Support of multiple RepeaterMatrix fields on one page Configurable which roles and fields are excluded Configurable dialogs for copy and paste Duplicated items are automatically pasted to the end of the target field and set to hidden status so that changes are not directly published Automatic clipboard update when other items are picked Automatically removes old clipboard data if it is not pasted within 6 hours Delete clipboard itself by clicking the selected item again Benefit: unbelievably fast workflow and content replication What the module can't do Before an item can be duplicated in its current version, the source page must be saved. This means that if you make changes to an item and copy this, the old saved state will be duplicated Dynamic loading is currently not possible. Means no AJAX. When pasting, the target page is saved completely No support for nested repeater items. Currently only first level items can be duplicated. Means a repeater field in a repeater field cannot be duplicated. Workaround: simply duplicate the parent item Dynamic reloading and adding of repeater items cannot be registered. Several interfaces and events from the core are missing. The initialization occurs only once after the page load event Attention, please note! Nested repeaters cannot be supported technically. Therefore a check is made to prevent this. However, a nested repeater can only be detected if the field name ends for example with "_repeater1234". For example, if your MatrixRepeater field is named like this: "content_repeater" or "content_repeater123", this field is identified as nested and the module does not load. In version 2.0.1 the identification has been changed so that a field ending with the name repeater is only detected as nested if at least a two-digit number sequence follows. But to avoid this problem completely, make sure that your repeater matrix field does NOT end with the name "repeater". Changelog 2.0.1 Bug fix: Thanks to @ngrmm I could discover a bug which causes that the module cannot be loaded if the MatrixRepeater field ends with the name "repeater". The code was adjusted and information about the problem was provided 2.0.0 Feature: Copy multiple items at once! The fundament for copying multiple items was created by @Autofahrn - THX! Feature: Optionally you can disable the copy and/or paste dialog Bug fix: A fix suggestion when additional and normal repeater fields are present was contributed by @joshua - THX! 1.0.4 Bug fix: Various bug fixes and improvements in live synchronization Bug fix: Items are no longer inserted when the normal save button is clicked. Only when the past button is explicitly clicked Feature: Support of multiple repeater fields in one page Feature: Support of repeater Min/Max settings Feature: Configurable roles and fields Enhancement: Improved clipboard management Enhancement: Documentation improvement Enhancement: Corrected few typos #1 1.0.3 Feature: Live synchronization Enhancement: Load the module only in the backend Enhancement: Documentation improvement 1.0.2 Bug fix: Various bug fixes and improvements in JS functions Enhancement: Documentation improvement Enhancement: Corrected few typos 1.0.1 Bug fix: Various bug fixes and improvements in the duplication process 1.0.0 Initial release Support this module If this module is useful for you, I am very thankful for your small donation: Donate 5,- Euro (via PayPal – or an amount of your choice. Thank you!) Download this module (Version 2.0.1) > Github: https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDuplicate > PW module directory: https://modules.processwire.com/modules/inputfield-repeater-matrix-duplicate/ > Old stable version (1.0.4): https://github.com/FlipZoomMedia/InputfieldRepeaterMatrixDuplicate/releases/tag/1.0.4
  20. I see old posts saying that repeaters are not the way to go in Custom Process Modules. If that is the case, when using forms (as I am trying to do) how would one tackle things like repeat contact fields where there can be multiple requirements for contact details with different parameters? (Like point of contact, director, etc) or even telephone numbers that have different uses? Just for background I am creating a process module that allows me to create types of financial applications in the admin area (no need to publish any of this, pure admin) that require a lot of personal or company information. Maybe I am thinking about this incorrectly?
  21. Coming from Perch (CMS) to Processwire, the one major downside I've found is that every place I want to insert content into my pages requires a single field (be that an image, integer, string, etc.). This can be a real pain to setup and manage if you have a lot of pages, many of them with dozens of unique fields. For example, on the Projects page of a site I'm working on right now I have to have fields for donate_amount (1-15, meaning fifteen unique fields that I have to duplicate manually), goal_amount(1-15), card_body(1-15), etc. After using Perch for a while, the way their system works is simply easier. You instead create your fields in a single PHP template (for every unique section, like a card) and their CMS imports those fields into the CMS when you choose to use that card, then you just fill in the values. You can also choose to reuse that card multiple times and each one you add gives you the several fields you need to fill in. So you can easily add your 15 cards, each with a picture, title, paragraph, and link, etc. and each one is basically given a unique ID that you can reference in your CSS files. If there's any way to make fields and templates work more like that, it would be a truly outstanding and efficient CMS. The great advantage of the way Perch is setup is that I can make a card with 10 fields, if need be, and easily duplicate that card out 40 times if I need 40 cards on the page and wouldn't need 10 fields for 40 cards (meaning in PW I would need 400 fields). If there's an easier way to do this in PW I would love to know, but as of right now, from what little I do know about the CMS 400 fields would be the only way to set that up, and that would be much more time consuming than if I could create one card (in PHP) with 10 fields that automatically added a number to the end of each field for each card (if that makes sense).
  22. I was previously using individual fields to capture and output multiple cards onto my web page but after recently learning about repeaters would prefer to use this field type, as it will be a lot more user friendly for end users to create new cards. I tried to modify my code to grab the fields from the new Repeater field(s) but am getting this error message on the page: Here is the code I'm currently trying to use for the cards: <?php // https://processwire.com/api/arrays/ // check if the array of images has items foreach($page->tall_card as $card) { $count = 0; $count++; $options = array( 'quality' => 70 ); $image = $card->image; $img = $card->image->size(550, 400, $options); $cardHeading = $card->title; $cardBody = $card->plain_paragraph; $raised = $card->raised_amount; $goal = $card->goal_amount; $link = $card->link; if ($raised == 0 ) : $percent = 0; else: $percent = $raised_amount / $goal_amount * 100; endif; if ($percent <= 5) : $percent = 0; endif; ?> <span id="card<?php echo $count?>" class="card"> <img class="cardThumb" src="<?php echo $img->url; ?>" alt="<?php echo $image->description; ?> Thumbnail" /> <div class="cardBody"> <div class="cardText"> <h2><?php echo $cardHeading; ?></h2> <?php echo $cardBody; ?> </div> <div class="progressBarSection"> <progress class="progressBar" id="progressbar<?php echo $count; ?>" value="<?php echo $percent; ?>" max="100"></progress> <span class="raisedAmount"> $<?php echo $raised; ?> usd </span> <span class="goalAmount"> $<?php echo $goal; ?> usd </span> </div> <div class="primaryBtn"> <a href="https://www.paypal.com/donate?hosted_button_id= <?php echo $link; ?> &source=url"> <button> <i class="fas fa-donate"></i> Donate </button> </a> </div> </div> </span> <?php } ?> Thanks in advance for any help!
  23. It's been twice this year as a PW developer where clients have asqued me to have a way to put content on specific coordinates of a picture. Something like what image maps are made of. But not necesarly on links, sometimes text, sometimes images and links. So I've been thinking to build an inputfield for that purpose. But I'm not sure how could it be the most flexible so I can share it in github/modules page. Ideally it would need to work like a repeater field where you start uploading an image and then adding any custom field like title, url etc. So the user could add multiple elements floating over that image. Does anybody here know the ideal way to start the arquitecture of something like that? I could just hardcode the fields I need for the website I have to code this month but it would be nice to be something more flexible.
  24. Hi folks, I use the Page field quite often to cross reference data on the sites that I build and they are super useful, but I have a question regarding doing the same thing but with a repeater field? I know a lot of you know might think that perhaps I am using the repeater field wrongly and that the data should in fact be pages but I believe in this case that the repeater field is the best option. I have a Publications section on my site, which include image and title only, for each. I had thought about making each Publication a 'page' but then all you have on each page to edit is an image and thought this was maybe a bit clunky to do and a repeater would be better? So, if I make Publications a repeater... can I grab a specific 'field' from the repeater in a Page-like field? So, on another section, say Projects, I would be able to link a specific Publication to a Project via a dropdown field. You know? Let me know if you think there's a better way of doing this... it might be that if I ever need to cross reference another piece of data (an entry in the CMS) then it needs to be part of a 'page' and then easily selectable via a Page Field. Thanks! R
  25. how to get all the subfields of a repeater field generically? I'm not talking about a specific field that I know the name of, that's easy, I'm trying to access them in general in the $fields variable itself. Better yet, how to access them by type?
×
×
  • Create New...