Jump to content

benbyf

Members
  • Posts

    796
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by benbyf

  1. 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...?
  2. I ended up just ripping out what I needed from this (didnt think it required a whole library really), so I also included google and outlook as options.
  3. Spent too long getting this to work so I've made a short github gist and have included it here so people don't have to ? https://gist.github.com/benbyford/ada3a229501c769880b0aa2b13276d3e I've added this php instead of the normal page in my templates when a /cal url query is preset.
  4. Sorry yes I mean ProFields: Table
  5. no problem at all. You gave me an idea actually, maybe we could try ProFields:Tables and setup a simple set of fields for each form element–might contrains the types of inputs you could use but might be a start... maybe wth a set of defaults that can be stored somewhere else.
  6. 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? Thanks
  7. 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.
  8. 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.
  9. will this need a $p->save to make it work?
  10. Yes the PaymentStripeIntents module does implement their new Intents API and is therfore SCA ready.
  11. this would be ace. if I had more time I would look into it, but sort of scares me. ?
  12. 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. admin.php $config->scripts->add($config->urls->templates . "admin.js"); $config->styles->add($config->urls->templates . "admin.css"); admin.cs .table-grid{ display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; } .grid-item{ /* border: 1px solid £; */ padding: 0.5em; } .activeGridName{ background: rgb(197, 219, 226) !important; } admin.js $(function(){ // 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"); $(colStart).addClass('table-value-input') .attr('data-table-type','colStart') .attr('data-name-data',name); $(rowStart).addClass('table-value-input') .attr('data-table-type','rowStart') .attr('data-name-data',name); $(colEnd).addClass('table-value-input') .attr('data-table-type','colEnd') .attr('data-name-data',name) $(rowEnd).addClass('table-value-input') .attr('data-table-type','rowEnd') .attr('data-name-data',name) $(rows).eq(i).attr("data-name",name); // 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'); console.log(data); console.log(type); console.log(name); switch (type) { case "colStart": $(".grid-item[data-name='"+name+"']").css("grid-column-start", data); break; case "rowStart": $(".grid-item[data-name='"+name+"']").css("grid-row-start", data); break; case "colEnd": $(".grid-item[data-name='"+name+"']").css("grid-column-end", data); break; case "rowEnd": $(".grid-item[data-name='"+name+"']").css("grid-row-end", data); break; default: break; } }); $(document).on("mouseover", "[data-name]", function(){ var data = $(this).attr("data-name"); $("[data-name='"+data+"']").addClass("activeGridName"); }); $(document).on("mouseout", "[data-name]", function(){ var data = $(this).attr("data-name"); $("[data-name='"+data+"']").removeClass("activeGridName"); }); } }); Main problem at the moment is it isn't very portable–you have to know the field name for it to work.
  13. Also as an aside... does anyone esle think the functionality in Pro fields: Table should be in core?? Seems too useful or basic requirement.
  14. Tried to create a module for this and got into a hole of SQL schema and module doc spagetti so gave up. Instead I bought Pro fields: Tables as it looked like it was almost there and hacked some javascript and css ontop to get this. I'm going to use the row and column data in the frontend to assign my grid so they should be the same. processwire-pro-tables-hack.mov
  15. I did this as @psy mentioned using those two modules. 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.
  16. 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
  17. 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
  18. 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.
  19. I can look at getting them more closely integrated when I’m back next week from holidays. I’ve not used the padloper module and tbh it might be better that they integrate it or do their own as I’m not selling this as a premium module, just my own version of the new Stripe Intents API
  20. Hey @MarcoPLY did you follow the readme? The render method currently doesn’t do anything in this module.
  21. Ah ok thanks, probably to do with the schema of the site profile I’m installing then. Will try starting from a default profile and overwriting to get where I was. Thanks
  22. Very confused about this, did an installation, wanted to change profiles so deleted EVERYTHING and reinstalled and getting this very strange error: Anyone come across this, not happened before. I use serverpilot.com and digitalocean with Ubuntu 14 boxes installing 3.0.123
  23. More implementations Ajax modal version: : New page version:
  24. Example implementation: Info: So this is very much an ALPHA version of what I hope turns into a swiss armory knife payment module. Currently you are able to take payments with the payments form or cross browser payments button (Apple Pay etc). Please read implementation details here and consider contributing https://github.com/benbyford/PaymentStripeIntents TODO: Add subscription functionality Add customer functionality More testing and code clean up More usage examples anything else?
×
×
  • Create New...