-
Posts
516 -
Joined
-
Last visited
Everything posted by louisstephens
-
wiremail [SOLVED] How to use WireMail with a submit button?
louisstephens replied to louisstephens's topic in API & Templates
Thanks @adrian! I found my issue, I wrote it correctly in my question, but I failed to spot that I a simple misspelling in my set up. -
I have been using the wiresmtpmail module in a few installs for sending out automated emails etc etc, and it works flawlessly. However, I now need to send an email when a user submits a form, and for the life of me I can not figure out how to get the form to submit. if(isset($_POST['Submit'])) { $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $toName = $sanitizer->text($input->post->fullname); $toEmail = $sanitizer->email($input->post->email); $phone = $sanitizer->text($input->post->phone); $comments = $sanitizer->text($input->post->comments); $subject = $page->store_name . $page->title; $numSent = wireMail($toName, '', $subject, $textBody, $options); } If I remove the if statement, the form submits just fine, however you can just refresh the page (without adding anything to the fields), and it will submit a blank email every refresh. Has anyone gotten this working with a submit button?
-
Just wanted to say thanks horst for the awesome work on the module! It has truly been a life saver!
-
I finally found a better framework than ProcessWire.
louisstephens replied to alxndre's topic in Dev Talk
As a lover of FORTRAN, I am going to have to start using this immediately! I have been waiting on a framework that ticks all of my requirement boxes, and finally it has been found. -
How should I write this code - SOLVED
louisstephens replied to OllieMackJames's topic in General Support
Sorry about the confusion on my part @OllieMackJames, this should work for a repeater: <?php if( $page->id == 1 ) { foreach($page->name_of_repeater as $item) { echo $item->page2use4homepage; } } else { //do something here } ?> However, what type of field is page2use4homepage (inside the repeater). -
How should I write this code - SOLVED
louisstephens replied to OllieMackJames's topic in General Support
Not tested out, but it should work right for you. <?php if( $page->id == 1 ) { echo $page->page2use4homepage; } else { //do something here } ?> -
Posting to a php folder without creating a page
louisstephens replied to nickngqs's topic in General Support
Merely curious, but I was wondering why you don't handle the request with the same page (action="./") ? -
Thanks for the module! I will have to give it a try this week. In the past I have just use the Pro Fields: Textarea module to create "fields" for each day, which was quite convenient. However, this looks promising and quite straight forward. ** Just in case, I added a screenshot of the layout using dummy times.
-
Image Tags not displaying for Images in page edit
louisstephens replied to louisstephens's topic in API & Templates
Well, I went and unchecked "Use Tags" and rechecked it, now it works. -
I have a "strange" issue with my dev set up, that I just noticed today. I set up an image field named "dev_gallery" and checked the "use tags" option when setting it up. I went to add a couple image to the field, and noticed that the tags option is not displaying at all for the image. Currently, the description field is the only current field on image edit. Have I missed a basic setting to enable this? I am currently using PW 3.0.62 as well.
-
Creating dynamic blocks on a per page basis
louisstephens replied to nickngqs's topic in Getting Started
Thanks @gmclelland, I had the "how", but I guess I was confusing myself on how the rendering would actually work. I was just assuming that they would display in the order of the if statements and not the way they were ordered. Ill go to my dev environment and test it all out. I appreciate the insight! -
Creating dynamic blocks on a per page basis
louisstephens replied to nickngqs's topic in Getting Started
@elabx, I know this is an older post (by a couple months), but how to you set up your template to handle if a user moves a section around (ie, moves the feature card above the intro)? -
Not tested, but you could search by template(s) and doing something like: <?php $replies = $pages->find("template=your_template"); foreach ($repliess as $reply ) { foreach ($reply->comments as $message) { # code... } } ?>
-
A quick/dirty method would be to add a class of "something-$counter" and use display none except on the last element with css. $counter = 0; foreach ($page->flexible_content as $content) { if ($content->type === 'text') { <div class="something-$counter"> //share button </div> $counter++; } elseif ($content->type === 'images') { // } } Sorry, it is really rough.
-
Unfortunately, I do not. I have done a super simple check-box/image page which I check against a date/time field to take down/put up ads. However, are you looking for something that uses impressions?
-
I for one do not use bootstrap anymore. I got fed up with the bloat and components that I just never used. I found that I was using about 8% of what was being offered out of the box, so I started to look for alternatives. I followed a great tutorial by Chris Coyier and rolled the things I learned into my own grid system. Thus far, I really am enjoying it. If I need a slider or library, I just include it with my work flow so my grid stays nice and light. Also, if I need something in particular that my grid does not do, I simply update it to encompass it.
-
Looks great! Quick question: Is there any reason why "Branding" is the only text in english on https://supertiny.agency/en/about/ (under what we do)?
-
Very peculiar behaviour with wire('pages');
louisstephens replied to joe_g's topic in General Support
I assume you are using the namespace in your util.php file? <?php namespace ProcessWire; -
As much as I like the idea of including more with the site profiles, I feel like a lot of these are user specific. I rather like the fact I can quickly add in what I need based on the project scope. I actually have a folder with a few dependencies (slideshows, data tables, grids) that I just copy over to a new install and can get up and running quite quickly.
-
Help with implenting of booking system under PW
louisstephens replied to flashmaster's topic in General Support
This might have something to do with the fact that ProcessWire by default block access to files in the templates directory. @BitPoet pointed this out here: You might need to move this files etc outside the template directory. However, I have not gone through ALL the code yet as there is a ton. I'll keep digging through it. Someone please correct me if I am wrong, as I have not worked much with assets that dont run through the processwire environment.- 10 replies
-
- 1
-
Help with implenting of booking system under PW
louisstephens replied to flashmaster's topic in General Support
As mr-fan suggested, why not just use the great power of processwire? It might take you a few minutes to get the fields/templates set up (though I know you say you dont need it), the advantages I think would greatly outweigh the headache of trying to get this .rar to run reliably on a page that is already in the processwire environment. Using some simple php, a calendar (or even just a check box in the backend etc) you could get this set up quickly.- 10 replies
-
I personally like slick.js . However, unheap.com is a good resource (some paid, some free).
-
Website so Slowly when visit at first time
louisstephens replied to Ahmad's topic in General Support
As far as the content not displaying until it loads, it might be due to your apear.js file. It appears that modernizer is not defined (since you removed it), and your plugins.js file is depending on modernizer. -
Good call on that Zeka. I forgot about that (as it is now just part of my workflow).