Macrura Posted December 13, 2015 Share Posted December 13, 2015 it might work, but you could also try page table - might be a little cleaner UI 1 Link to comment Share on other sites More sharing options...
adrianmak Posted April 22, 2016 Share Posted April 22, 2016 I have issue using repeater field in multi-language https://processwire.com/talk/topic/13098-pages-created-by-api-could-not-able-to-retrieve-from-other-languages/?p=118618 Link to comment Share on other sites More sharing options...
Sten Posted December 1, 2022 Share Posted December 1, 2022 Hi, I copied the modules from an other installation. As I want to install the module, I have this message: Cannot declare class ProcessWire\FieldtypeRepeater, because the name is already in use Do you have any hunch about it? Thank you Link to comment Share on other sites More sharing options...
AndZyk Posted December 1, 2022 Share Posted December 1, 2022 The fieldtype repeater module is a core module and located under https://github.com/processwire/processwire/tree/master/wire/modules/Fieldtype/FieldtypeRepeater It should not be in the site/modules folder, you can just install it under Modules => Core. 1 Link to comment Share on other sites More sharing options...
Sten Posted December 1, 2022 Share Posted December 1, 2022 Thank you AndZyk, I will remove it and refresh. 1 Link to comment Share on other sites More sharing options...
Sten Posted December 3, 2022 Share Posted December 3, 2022 Hi, I have strange bug : Minutes in a date field are not fine in my repeater field. If I display 2023-04-03 18:30:00 it shows the minutes as 06 instead of 30. I checked up the date in the database it is fine. I checked up replacing the result in my page by the string, it works. I tried with strftime then I formatted with the date function for hour and minutes I still have 06mn Thank you for any help Link to comment Share on other sites More sharing options...
teppo Posted December 3, 2022 Share Posted December 3, 2022 Hey @Sten, Sounds like your field (moment) may be configured to output a date that strtotime doesn't understand. You could test by seeing what "echo $event->moment" returns; is it "2023-04-03 18:30:00" or something else? Anyway, one way to resolve this would be to replace "$moment=strtotime($event->moment)" with $event->getUnformatted('moment'). This will return a timestamp, so strtotime is no longer required. 1 Link to comment Share on other sites More sharing options...
Sten Posted December 3, 2022 Share Posted December 3, 2022 1 hour ago, teppo said: Anyway, one way to resolve this would be to replace "$moment=strtotime($event->moment)" with $event->getUnformatted('moment'). This will return a timestamp, so strtotime is no longer required. Thank you very much Teppo, it worked fine. 1 Link to comment Share on other sites More sharing options...
Sten Posted December 8, 2022 Share Posted December 8, 2022 Hi, How could it be possible to put the "Add new" link at the top of the page administration? Thank you Link to comment Share on other sites More sharing options...
szabesz Posted December 9, 2022 Share Posted December 9, 2022 19 hours ago, Sten said: How could it be possible to put the "Add new" link at the top of the page administration? This is the same UX issue I always encounter with "ProFields: Page Table" (aka FieldtypePageTable) as well. So far, I have only solved it for Page Table, but I guess you could do something similar in your case as well. I used JavaScript for the admin to clone the button, like this: /* * Adds a clone of the PageTable field's Add New button to the top of the table */ function clonePageTableAddButton() { $(".InputfieldPageTableButtons").each(function () { $myButtons = $(this); $myTableContainer = $myButtons.closest(".InputfieldPageTableContainer"); //Only add button when Table is not empty (length != 0) and no button has been added already (length < 2) if ($myButtons.closest(".InputfieldPageTableContainer").find(".AdminDataTable").length != 0 && $myTableContainer.find(".InputfieldPageTableButtons").length < 2) { $myButtons.clone().prependTo($myTableContainer); } }); } I also had to solve the issue what crops up when the Page Table is updated via ajax calls, so I had to implement a little bit more what I posted above, but if repeatable fields are not updated via ajax, then probably something no too complex to code should be enough to clone the button after the DOM is ready to be manipulated. Hope this helps. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now