-
Posts
2,318 -
Joined
-
Last visited
-
Days Won
2
Everything posted by pwired
-
Ok got it working with this: mail($emailTo, "Bestellung", $msg1, $header = "MIME-Version: 1.0\r\nContent-type: text/plain; charset=UTF-8\r\n"); Now the ü appears correctly in the received emails. Can anyone confirm that this is 100 % code tight ? Edit: tried a few test orders and all looks well in the received emails with ü and ö
-
How do I add Content-type: text/plain; charset=UTF-8 correctly inside the following; mail($form, "Ihre Bestellung", $msg2, "From: $form"); to make the ü appear corrctly in the received emails ?
-
I use mail($form, "Ihre Bestellung", $msg2, "'Content-type: text/plain; charset=UTF-8'"); I already have some result with this part what I added "'Content-type: text/plain; charset=UTF-8'"); but now I receive 2 times an email on the clients email address Guess I am not using the right format in mail
-
Hi I have this part in a php form: "Danke für Ihre Bestellung bei\n" . //$msg2 with contents for the client $msg2 = "=======================================\n" . "Danke für Ihre Bestellung bei\n" . "---------------------------------------\n" . "Bitte überweisen Sie den\n" . "\n" . If the form is sent, both the webshop owner and the client recieve an email. So far so good. Only the ü in für and the ü in überweisen appear garbled (strange characters) in the received email. I tried setlocale(LC_ALL, "de_DE.UTF-8"); in the php form and I do not have setlocale(LC_ALL, "de_DE.UTF-8"); in config.php But that did not help.
-
; All well explained here by the chief commander: https://github.com/ryancramerdesign/ProcessHannaCode
-
Exactly, you said it. My snippet thread was a nice attempt but is hardly found like so many other great posts in the forum. Blame it on ppl who have a reason not to spend time searching directly in the forum categories. I figured out time ago that the pw forum needs a proper index and already registered a domain for it. Not only for giving a better focus on all those good threads and slow down questions with repeat=on. (I also make my self guilty on this every now and then), but also to expand on processwire. PW is not only a unique opportunity for ppl to make websites and to make your steps into the world of coding, but => also to expand on it. just look at the websites made by teppo and nico. Edit: time is not on my side so it´s not going to be there soon.
-
Ok, after digging with google I found my error. It was in my thinking. Still happens as long as code looks like crypto during the learning process. First of, in the part name="some_name" name is the variable that is assigned the string in value="some_value". So, in type="radio" or type="checkbox" the same thing happens as in type="text" or type="email" where it already was working. In the part value="$form[bestellung]" I replaced $form[bestellung] with a text string corresponding to the selection radio or checkbox, e.g.: <input type="checkbox" id="bestellung" name="bestellung" value="two_sets_wheels" />2 Sets of wheels<br> Now it's working and the contents of "Bestellung: $form[bestellung]\n" is sent with $msg in the email. msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Land: $form[land]\n" . "Bestellung: $form[bestellung]\n" . "Comments: $form[comments]"; So in case of where input type="email" or type="text" you can use the variable in name="email" or name="fullname" as value="$form" or value="$form[fullname]" but in case of where input type="radio" or "checkbox" value has to be a text string like value="2_sets_wheels" The fact that my form is now sending the values in input type="radio" is proof that I am on the right track. If anyone can add or improve something to this, please be welcome.
-
It´s here https://processwire.com/talk/topic/407-processing-contact-forms/#entry36384 And yes added this gold to my snippet library I am expanding successfully on this form code with Land, Order, etc. I works beautifully when input type is text or email. Only have a problem when input type is radio or checkbox Then: $msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Land: $form[land]\n" . "Bestellung: $form[bestellung]\n" . "Comments: $form[comments]"; the contents of "Bestellung: $form[bestellung]\n" is not sent. I think I use something wrong here <p> <label for="bestellung">Bestellen</label><br /> <input type="checkbox" id="bestellung" name="bestellung" value="$form[bestellung]" />1 Set<br> <input type="checkbox" id="bestellung" name="bestellung" value="$form[bestellung]" />2 Sets<br> <input type="checkbox" id="bestellung" name="bestellung" value="$form[bestellung]" />3 Sets<br> <input type="checkbox" id="bestellung" name="bestellung" value="$form[bestellung]" />4 Sets<br> </p> value="$form[bestellung]" works if in input type="text" but stops to work when type="radio" or type"=checkbox" Maybe I have to enter a text string in value like so: value="Set 1" and then assign in some way "Set 1" to $form[bestellung] so that it can be sent correctly in the part "Bestellung: $form[bestellung]\n" . $msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Land: $form[land]\n" . "Bestellung: $form[bestellung]\n" . "Comments: $form[comments]";
-
I told you guys this forum is full of gold, look what I found here: https://processwire.com/talk/topic/407-processing-contact-forms/ And guess what: I have it working!
-
Does anyone know where to find a quick form ? A simple one where a visitor can enter name, email, and request. I know it can be done extending on something like this <form method="post" action="sendmail.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> but need something out of the box coded quick. maybe google
-
He made version 2.5.0 => best ever, got me hooked. The forum needs it´s own index. Working on it.
-
This has been asked many times before and has been answered many times by experienced people on the forum. Search with {google + pw}
-
Stuck with $pages->get("/path/to/page/") inside <a href=""></a>
pwired replied to pwired's topic in API & Templates
-
Has this something to do with pw 2.5.0 because the header.inc and footer.inc in that version are gone ? Although you can re-create them for your self at any time can´t you ? I also like those .inc files because with them I can let pw manage my markup in an easy way. Has one of your pages a different look, just include different .inc files with the same output between the html tags. Someone said that those .inc files are not safe because the code inside can be read by anyone over a direct internet url. Further I have not the faintest idea about what delayed ouput is let alone it´s advantage. https://processwire.com/docs/tutorials/how-to-structure-your-template-files/page4
- 206 replies
-
- 1
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
Talking about it, this would be a good slogan: Free your website with Processwire - - - - - -
- 206 replies
-
- 1
-
-
- standarisation
- templates
-
(and 1 more)
Tagged with:
-
Pencil http://pencil.evolus.vn/ http://pencil.evolus.vn/Features.html
- 38 replies
-
- 1
-
-
- software
- prototyping
-
(and 1 more)
Tagged with:
-
If you want to add a picture slider I can recommend bxslider. It is easy to use in processwire. Bxslider is responsive and has all the parameters to fine tune it to your wish. http://bxslider.com/examples
-
Yes, that´s true. But we can still keep a copy of Fireworks and keep on working with it. Even when it is no longer updated. What I hated is that adobe flash got dumped. I blame Apple for it because they never liked it that coders could make independent (outside the app store) applications in the browser. Flash action script 3.0 was very powerful
- 38 replies
-
- software
- prototyping
-
(and 1 more)
Tagged with:
-
Stuck with $pages->get("/path/to/page/") inside <a href=""></a>
pwired replied to pwired's topic in API & Templates
Guys you really got me there. I had concatenate in the back of my mind but could not figure it out, switching back and forth between " and ' or escaping them or use concatenate - couldn´t follow up. @Joss-martijn-diogo - thanks for your code examples. Edit: I can add { to the list so now I have " ' { . to learn to sort out. -
Stuck with $pages->get("/path/to/page/") inside <a href=""></a>
pwired replied to pwired's topic in API & Templates
Thanks Joss but when I use it like this echo '<div id="button3" class="button_style"><a href="<?=$pages->get("/kontakt/")->url ?>">kontakt</a></div>'; the kontakt button disappears. My fault: using two times echo This is a quote and escape jungle: " ' { . I think it has to be something like this: <a href='<?php echo $pages->get("/kontakt/")->url?>'>kontakt</a> But the first echo already starts with a single quote -
I have a problem with this line: echo '<div id="button3" class="button_style"><a href="./kontakt/">kontakt</a></div>'; Every time when I click on the button, it only 1 time goes to the page kontakt and after that the word kontakt is added to the link unendlessly, instead of going to the page kontakt. So I think I need to use something like: $pages->get("/path/to/page/") The page kontakt is a child of home, so I think that would be $pages->get("/kontakt/") Now I need to make the word kontakt clickable and link to the internal page kontakt. echo '<div id="button3" class="button_style"><a href="$pages->get("/kontakt/")">kontakt</a></div>'; I am stuck with the part $pages->get("/kontakt/") how to get this inside <a href=""></a> in the right way.
-
WoW, what can I say, pw production band ? Great design/pics as ever.
-
Hi Mike Anthony Yes, I read about heredocs, actually that looks nice as you don't need to use escape \ and can write the html line as it is. Somehow we are hooked on echo with escapes. Thanks for the link you included. Now this part of the read in the text of that link is interesting: Quote: Heredoc's are a great alternative to quoted strings because of increased readability and maintainability. You don't have to escape quotes and (good) IDE's or text editors will use the proper syntax highlighting. A VERY common example: echoing out HTML from within PHP: $html = <<<HTML <div class='something'> <ul class='mylist'> <li>$something</li> <li>$whatever</li> <li>$testing123</li> </ul> </div> HTML; // sometime later echo $html; Easy to read. Easy to maintain. The alternative is echoing quoted strings, which end up containing escaped quotes and IDEs aren't going to highlight the syntax for that language, which leads to poor readability and more difficulty in maintenance. end quote. Seems you can also use it in other ways like in sql: $sql = <<<SQL SELECT * FROM table SQL;
-
Yes lots to study : a) double quotes forces PHP to evaluate the string (even though it might not be needed) b) a string between single quotes is not evaluated. c) parsing a variable between strings takes more memory than concatenate a variable. So this should work: echo '<div id="button2" class="button_style" onclick="location.href=\'page2.html\';" style="cursor: pointer;">product</div>'; Edit: Tried it and the above works, even the onclick part Tried also the other way around = starting with echo "<div id= . . . and escaping with \'page2.html\' obviously the button appeared but the onclick part failed.
-
I have this html line: <div id="button2" class="button_style" onclick="location.href='page2.html';" style="cursor: pointer;"> product </div> This html has double quotes and single quotes and is no problem when this line is hard coded. But I want to echo this line and then there is a problem because there are already single quotes in that line in the part onclick="location.href='page2.html';" echo always starts and ends with a double quote like this: echo " html "; If I want to echo the above html line it would start with double quotes and have to replace the next ones with single quotes like this: echo "<div id='button2' class='button_style' onclick='location.href='page2.html';' style='cursor: pointer;'> product </div>"; But what about the part onclick="location.href='page2.html';" I can replace the double quotes with single quotes but what about the single quotes in the part href='page2.html' How am I going to replace those single quotes ? Edit: I think I found something on stack overflow http://stackoverflow.com/questions/3383838/how-to-use-single-quotes-inside-single-quotes