Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by benbyf

  1. GRRRRRRRR ok found something that worked in the form settings for pages two levels deep i have to turn off Disable session tracking and CSRF protection? which must be getting in the way and disallowing everything. not sure how to get around this but might add a honey pot as replace meant... but either way I get LOTS of spam before sooooooo not great... gonna have to fob off FormBuilder at this rate

  2. I have a a form in my site footer that can be accessed anywhere on site, I've added the form in the _inc.php file and added the render in the pages footer.php. However, this works well on the homepage e.g. you can submit said form and get a thank you on reload, doesnt work at all on other pages... Just lots like a fresh reload. Any thing im doing wrong here or ways to diagnose as there isn't an error log for formbuilder etc...?

  3. Hi, Looking to create form elements on a page–some input with a colection of form inputs and the appropriate labels and variables for that input. I've used ProForms in the past and rolled out my own when creating simply one off forms, but I wonder if anyone has found a good way of allowing form creation on page editing so that clients can adhocly make and edit forms?


    • Like 1

  4. Unable to install module (ProcessRedirects): Specified key was too long; max key length is 1000 bytes

    get this when installing ProcessRedirects on PW 3.0.139. It adds an empty admin page to Setup and dies before publishing. Any help would be appreciated.

  5. 43 minutes ago, strandoo said:

    @benbyf Hi Ben. I've been trying out this module and modified the form for use with the Padloper shopping cart. (I was using a different Stripe module but I needed to upgrade to one that uses Intents). All is working well, but I've just realised that I've got a lot of 'incomplete' transactions listed in my Stripe Admin panel. I see the cancelIntent() function in the module, but I'm not sure when/how I should call this. Could I use this to get rid of my backlog of incomplete transaction? Sorry if I'm  being thick, but I guess I don't quite understand the Stripe Intents concept. Thanks.

    Great to hear its working for you. I have the same issue but its nothing that is wrong per say. Everytime a intent is created it creates an incomplete transaction on your account which is then followed by a completed transaction or failed depending on the user suceeding in the transaction. If you can work out how to get around this let me know, but I thought it was just a quirk of the new way of working.

  6. 1 minute ago, gebeer said:

    If someone wanted to wrap this into a portable inputfield module, they could create an module which extend InputfieldTable class and add the logic there. 🙂

    this would be ace. if I had more time I would look into it, but sort of scares me. 😕

  7. 22 hours ago, gebeer said:

    This looks really useful. Might still be a bit cumbersome for editors with all those start end rows columns. But nice how you made changes reflect instantly in the preview. Mind to share the code? 🙂

    What do you need the row settings for, Couldn't you act on drag&drop of the rows themselves inside the table field?

    Want to save the col and row info in the db so i can use it for css grid in the frontend. This will allow the client to add content that spans the first row, has two on the send that goes across half the grid, has 4 on the third row and has 2 with a gap in the middle on the fourth.... basically given them power to making interesting layout with whitespace.

    Ideally your right I would have the grid power the input of the PW fields and hide the col and row inputs but this is what i have so far.



    $config->scripts->add($config->urls->templates . "admin.js");
    $config->styles->add($config->urls->templates . "admin.css");


        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        /* border: 1px solid £; */
        padding: 0.5em;
        background: rgb(197, 219, 226) !important;


        // custom grid script for pages with applicable table
        // name of input field
        var inputFieldName = "#wrap_Inputfield_featured_grid";
        if($(inputFieldName)){ // table found
            var table = "<br><div class='table-grid-container'><label class='uk-form-label'>Frontend representation</label><div class='table-grid Inputfield'>";
            // setup table
            var rows = $(inputFieldName+" .InputfieldContent table tbody tr"); // UI has 1 hidden row
            for (var i = 1; i < rows.length; i++) {
                var director = $(rows).eq(i).find(".InputfieldPageAutocomplete input.ui-autocomplete-input");
                var tds = $(rows).eq(i).find("td");
                var colStart = $(tds).eq(2).find('input');
                var colStartValue = $(colStart).attr("value");
                var rowStart = $(tds).eq(3).find('input');
                var rowStartValue = $(rowStart).attr("value");
                var colEnd = $(tds).eq(4).find('input');
                var colEndValue = $(colEnd).attr("value");
                var rowEnd = $(tds).eq(5).find('input');
                var rowEndValue = $(rowEnd).attr("value");
                var name = $(director).attr("value");
                // console.log(colStart + " - " + rowStart + " - " + colEnd + " - " + rowEnd);
                var styles = "grid-row-start: "+rowStartValue+"; grid-column-start: "+colStartValue+"; grid-row-end: "+rowEndValue+"; grid-column-end: "+colEndValue+";";
                table += "<div class='grid-item Inputfield' style='"+styles+"' data-name='"+name+"'>"+name+"</div>";
            table += "</div></div>";
            // add table to UI
            $(inputFieldName+" .InputfieldContent").append(table)
            // value changes and event listening
            $(document).on("change", "input.table-value-input", function(){
                var name = $(this).attr("data-name-data");
                var data = $(this).attr("value");
                var type = $(this).attr('data-table-type');
                switch (type) {
                    case "colStart":
                        $(".grid-item[data-name='"+name+"']").css("grid-column-start", data);
                    case "rowStart":
                        $(".grid-item[data-name='"+name+"']").css("grid-row-start", data);
                    case "colEnd":
                        $(".grid-item[data-name='"+name+"']").css("grid-column-end", data);
                    case "rowEnd":
                        $(".grid-item[data-name='"+name+"']").css("grid-row-end", data);
            $(document).on("mouseover", "[data-name]", function(){
                var data = $(this).attr("data-name");
            $(document).on("mouseout", "[data-name]", function(){
                var data = $(this).attr("data-name");

    Main problem at the moment is it isn't very portable–you have to know the field name for it to work.

    • Like 2

  8. I did this as @psy mentioned using those two modules.

    On 12/11/2019 at 11:28 AM, 3fingers said:

    Thanks @bernhard, I'll dig it deeper with your suggestion, even though it seems like their rates are way too high for my project.

    @psy Nice module! I'd love to use it to complete this task, looks like it could let me easily list files of a dropbox folder into my site.

    How to share, instead, just some specific files (belonging to the dropbox folder) to a specific user?

    The ideal situation would be:

    1) My client (whom is the one has access to the dropox panel and can upload files) decide to share just few files to user "x" (user "x" has previously registered to my pw site and has a private page).
    2) Choosen files appears as links on the private user page ( I've noticed this on the thread you posted, but it's just part of the job).

    One solution that comes into my mind would be to copy/paste such file links to a repeater belonging to the user page and iterate it on the front-end.

    In my implementation I allowed my client to upload to folders in dropbox and in Processwire assign users access to specific folders (and the files within). On the frontend I would present the logged in user on the site with thier folder and files the client was sharing with them -> this was for promotional materials but could be anything really.

    • Like 2

  9. On 12/8/2019 at 12:18 PM, szabesz said:

    Hi @benbyf

    Just ideas, I hope this helps:

    As far as I know, the closest module which at least partially could be used for such grid building is @Macrura's Inputfield Selectize: https://processwire.com/talk/topic/13549-selectizejs-modules-family/ 

    Another idea – which also needs additional coding – but could be a working solution is to use @gebeer's new module FieldtypeImage Picker which is currently being polished: https://processwire.com/talk/topic/22665-module-fieldtypeimagepicker-pick-images-from-a-folder/

    And for the grid part you could implement a grid builder with something like this: https://gridstackjs.com/

    FieldtypeImage Picker could be used for setting the image, and the event of that selection could notify gridstack.js which could then set the content of corresponding the grid cell accordingly. As for uploading images on the fly, I have no idea about the possibilities, but if you can use ajax request in the correct order, then it might be possible to wire it all up.

    If a PW image inputfield is set to replace images with an already uploaded image having the same file name, then PW uploads and assigns the image to that page without the need to click the Save button, therefore images uploaded to the very same page could be made available right after being uploaded, provided FieldtypeImage Picker "be refreshed". You could consult Gebeer for such a possibility...

    Again, I am just brainstorming here.



    Thanks! Hugely usefull! Think my main issue is the grid editing element so I might implement most of the site and leave the editable image/link section till last and maybe look at building something. I would like it to mirror the frontend as much as possible, so i could just use css grid and do some limited js stuff pushing the page id's, item number and span columns and rows into the database..... mmmmmmmmmmmmm

    • Like 1

  10. Is there any way to create an input grid within a edit page which allows the user to select a cell and assign a page to it, e.g. from a list of pages of template "x" select one and assing it so that in the templates the table can be created and cells refer to the page itself or its id?

    I'm working on a site where the clients wishes to have a grid layout that they can adhocly put different page images into that link to the pages about that project. However they want each cell to be assignable or not and be able to span 1 or more cells... making an expressive layout.

    Any thoughts would be appreciated

  11. Just had a quick look and they're very similar. I'm using:

    $intent = $payment->paymentCheckout($description);

    Instead of $payment->render();

    The $intent variable then returns an array of the [0] Stripe form and [1] Intent Id. https://github.com/benbyford/PaymentStripeIntents/blob/master/PaymentStripeIntents.module#L138

    This is because you may want to store only the Intent or just the form. Like to spend some more time with this module soon, so there will probably better Readme and additions soon.


    • Like 1
  • Create New...