Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by LimeWub

  1. Haven't used the module before but I recommend adding $config->debug = true; to your config.php, during development, to get more detailed errors, so that you can debug this easier.
  2. @LostKobrakai Out of curiosity, and I have never used formbuilder, but wouldn't something similar to this be possible? $a = $people_who_have_signed_up->findOne("email_field=email_adrress_posted"); if($a->count){ //you have submitted this form before. } And if so, wouldn't that be decently efficient as it's a 'findOne'?
  3. Maybe a silly question, but is php properly installed on your server?
  4. @MarcU Your $item->thumbnail is probably not set, and thus a non-object (so you can't get its url without the Notice). Are you checking if your have an $item->thumbnail before trying to access it's property?
  5. @Roych Not sure if I'm right here, but have you tried something like: $Events = $pages->get('/Events/')->Events_repeat->find('limit=3,sort=-created')->getArray(); More info on sorting and limiting: https://processwire.com/api/selectors/#sort https://processwire.com/api/selectors/#limit
  6. Thanks so much for the responses @adrian @fbg13 and @gebeer ! You are all fantastic and so helpful! Looking into the recommended options now
  7. @fbg13 Yes! Having the submission under the users on the tree makes quite a bit of sense as I wont have to be storing a UserID! Thanks Just wondering though, shouldn't the users be created the same way admin users are created, just with a different usergroup (instead of as "pages" ?) -to allow for things like password reset etc?
  8. Just bumping as I did a bit more thinking about this today. Basically I think I am almost there, but as I don't want to reinvent the wheel, I'll just share my ideas in case there is functionality that does more of what I want to achieve out of the box instead. Form is built (by the developers) Users login Not sure exactly how to do but have seen multiple threads about this on this forum so should be ok to do. Potentially useful links from my search: https://bitbucket.org/pwFoo/frontenduser/wiki/Documentation https://processwire.com/api/user-access/permissions/ https://processwire.com/talk/topic/3706-how-to-blockredirect-one-user-role-away-from-admin-pages/ https://processwire.com/talk/topic/107-custom-login/ https://processwire.com/talk/topic/12896-frontend-user-login-and-access-levels/ https://processwire.com/talk/topic/2937-creating-a-front-end-admin/ Users edit multi form Angular 2 has been recommended to do this. Although might be overkill and should be able to do with pure JS/ajax (?) opinions? Form autosaves/saves per page Same as above... opinions? Secure Uploads included on the form, need to be visible only for the user who uploaded and site admin Never done this before either but was thinking of using Wanze's Secure Files module http://modules.processwire.com/modules/fieldtype-secure-file/ I'd need to create a front end upload field too, so could be a bit tricky? ideas? On save, form visible in the user's dashboard and submission's admin Should be straightforward enough. Form data would be saved in json form but I would be able to render that. Submission's admin an extension of the site admin for the admin user to be able to view submissions. An extra 'status' field in the only thing editable in the submission's admin. Maybe possible via Admin Custom Pages Module, although not 100% sure. On final submit, form gets posted to salesforce Data is sent to salesforce api and awaits an ok response if all ok, confirmation emails are sent. Not sure which module to use for that, or maybe just raw php but assuming should be very easy (?) Basically, if there's some easier way to do what I'm thinking or have any better ideas, please let me know (rough chart of my way of thinking included) Feel free to ask me to clarify if I don't make sense ^^
  9. Hey! This is more of a brainstorming phase question (sorry if it's a bit generic). We are currently tasked to make a website, whose main purpose is users logging in and then submitting a couple of multiple-page forms. An outline of the expected functionality would be something like this: User registers / logs in So user registration/dashboard will need to be possible. User begins stepped form (logged in users only) User can save progress and continue later from where they left off Means part of the form should be posted every time they go to the next step (or maybe via ajax every X seconds) WITHOUT sending a final confirmation email. Then when final 'Finish' button is clicked it should THEN email both admin user and posting user. Documents will be uploaded during the form. We want only the site admin and the submitter to be able to view these. Users shouldn't be able to see each other's uploads. User eventually submits form and then can view it (only their submission, not others) Submission available, to view only, in the user's dashboard. Users shouldn't be able to see each other's submissions. Form needs to be able to send data to Salesforce. On form final submit, data gets sent to salesforce. User submitting gets emailed. Admin User gets emailed of submission. Basically, asking for ideas for how to achieve this, if possible. Have been looking into modules and the FormBuilder module looks quite nice but might need quite a bit of extending to achieve the multi-page, progress saving functionality (?) @ryan Do you think using/extending this module would work for the above situation? Also, any ideas for how to limit front end users from seeing other people's content in processwire? Anyone who has any ideas for how to handle this, please throw them this way Thanks!
  10. Hey guys, Just a quick question this time. When a template is cloned most of its fields get correctly cloned with their notes and descriptions properly altered etc. However, their widths and other visibility settings don't clone properly (they seem to get entirely ignored). Is there a setting/page somewhere that lets me enable cloning for these? Or maybe a small module someone has already written? Would be very convenient if such a thing exists Thanks!
  11. Great module @ryan Our client wants support for another video site too, though. So I'm just trying to properly create/extend a module/use hooks for the first time, so as to add an extra embed function. Supposing I wanted to create support for an additional platform, where would I hook this into (I don't see any hookable functions other than install and uninstall in it)? Is this module extendable?
  12. Thanks for the responses guys! I got it! (not sure how I had missed it earlier...) Anyway, I've attached the settings I'm using for the block. Very similar to what @louisstephens suggested Thanks so much for pointing me to the right direction!
  13. Hey, I am using a block-like structure for a website I'm building, in which a page can be created using many building block "pages". For example - Page - slideshow block ("Page") - content block ("Page") On render, Page gets all it's children blocks and renders them. Everything with this approach works great, however, I have one issue... Issue: Block templates have a template file (to render with). This makes them accessible by url. For example: website.com/page/slideshow-block is a (very ugly) page on the site atm. Question: Is there any way to block certain templates from being accessed by their url? Seems like something that should be feasible but I just can't find the setting/way to do it... Thanks
  14. @Wanze Not sure atm. Due to having the deadline next week we've just switched to Processwire's templating engine for this site. Once we have some time, either in the Xmas holidays or from the new years I'll try it again and let you know Sry... I'll bump this again, once I have some time to breath (and test it).
  15. @Wanze It does bring me closer to what I need yup. ^^ But using view->set() in the block seems to also set the things to the outter page's view...?: Yh just re-read your answer so I suppose this is expected behaviour so... erm ...ok. Also what's the case if I want the child page to also be a page on its own? Is this not supported?
  16. Hey agaaaaiiin, So this time, I have a site which uses some of it's children as building blocks. On this site there is a "page" template (basic-page renamed) and a "block" template. I am trying to do something along these lines in the "page.php" template: $blocks = $page->children("template=block"); $blockHTML = ''; foreach ($blocks as $block){ $blockHTML .= $block->render(); } $view->set("blockHTML",$blockHTML); then in "page.tpl" I am just outputting {$blockHTML}. Block is a page in the admin with a different template (block.php and block.tpl respectively) I am expecting it to render using its own stuff. UNFORRRRTUNATELYYYY... it's not working. When I try to access my page I get errors from the template that: Notice: Undefined index: blockHTML in /Users/blablabla/www/site/assets/cache/TemplateEngineSmarty_compile/63d505f3501d05cbbf561ef4b5267fd8258c06dc_0.file.page.tpl.php on line It seems like block is trying to render with Page's template (which errors as blockHTML is not set in block...??)? I have tried dying after the first iteration of the loop and still get the error, which means this is a problem with block's rendering. Am I doing the render thing wrong? Help pls, this is quite urgent and I just can't get my head around why and what's the problem... T>T EDIT: Worth noting I have tried passing the .tpl file into the render function basically this way: $block->render("pathtomytemplate.tpl"). No luck. @Wanze
  17. The 500 error could have to do with the .htaccess file and the way apache handles requests on your Local server vs the Host one ^^ Or it could be user permissions on the Host server... (or something similar) I'd check out the apache error log if I were you ^^ EDIT: Wait one second, are you getting the errors while copying?? *_* (Not sure how this works .-.) Or do you mean, you copy and then try to access the site and you get 500'd?
  18. Had a read through that page but not sure how (?) Would I be creating the following repeater items(?): 1 col 2 col 3 col and then the user can add them as they want? This would actually be awesome to give the user flexibility to add as much text as they want but I've dealt with it a bit differently for now The way I solved this for now is: I completely removed the 3-column option and I just created a page/block with these text areas: text1: 100% text2: 50% - text3: 50% text4: 100% I then have a switch to show or hide text3 (for 1 column/2 column effect). If text1 or text 4 are empty they'll be ignored. So this should now work fine with a few 'if' statements on the front end :3 Thank y'all! I'm starting to quite like PW's flexibility
  19. Ah I see Will look into these options ^^ Thanks a lot for the help!
  20. Ah nice! This actually somehow works! (Actually it works perfectly with my example!!) However, in the real case scenario I have some more options unfortunately (so it doesn't exactly do what I want...) In the real scenario I have: 1 text area, 1 column 2 text areas, 2 columns (everything works awesome up to this, thanks) 3 text areas, 3 columns 3 text areas, 2 columns (1 wide column above two 50% ones) 3 text areas, 2 columns (1 wide column under two 50% ones) So basically everything works great up to 2 areas, then for the 3 area options things look dodgy. However, I got a bit of an idea to counter that (but I also don't know if I can do that) Is there some way to link fields, so that when the user fills out one, another field just gets the same text in it (copy)? (or maybe instead of copying just creating a link to say for example: Field A value is the same as Field C?)
  21. Ok, so I'm probably asking for too much here... but is there any way to specify different column widths for a field in the admin, depending on other field's values? For example: Imagine a dropdown field in our template in the admin with values: 1 column 2 columns When "1 column" is selected a text area field below has 100% width. When "2 columns" is selected, the same text area field becomes a 50% width field (and a second text area field 50% appears) This is not really necessary but it will make things a bit clearer to the end user for a site I'm building, so I thought I'd ask, just in case there's a way.
  22. Thank you all for the replies @adrian I think this will do it Will try it next time I have to delve into modules, but it looks good ^^ Thank you! @Robin S That wont be a problem for this situation but thanks for the warning
  • Create New...