Jump to content

pwired

Members
  • Posts

    2,221
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by pwired

  1. Hi Jan Romero, Thanks for posting about swiper.js - really stands out from the usual carousel/sliders
  2. Bumping this thread If you cannot add extra input fields and labels to the core Comments Form to expand on it, for example Surname, Country, Month, Year, or any other custom field/label, etc etc then what is the use of having it in this limited way in the core ? Would like to know who is using the core Comments fieldtype in Processwire and in what way, purpose ?
  3. With fbg13's jump start code, now it is easy to add some extra code and formatting and make a working form example out of it. 1) Add <?php namespace ProcessWire; on the top of your template to prevent error Class "Page" not found 2) Add action="./" to the form 3) Add labels and a <textarea> section to the form 4) Change the default named submit button into something custom e.g. Send <?php namespace ProcessWire; if($input->post->submit) { $p = new Page(); $p->of(false); $p->template = "test"; // template_to_save_form $p->parent = $pages->get("/test/"); $p->title = $input->post->name . " - " . date("Y-m-d"); $p->fullname_txt = $input->post->name; $p->message_txa = $input->post->message; $p->save(); } ?> And the form <form action="./" method="post"> <label for="fname">Full name:</label><br> <input type="text" name="name"><br> <label for="message">Message:</label><br> <textarea name="message" rows="5" cols="20"></textarea><br> <input type="submit" name="submit" value="Send"> </form> Enter a name, a message and hit the send button a few times and see magically grow the number of child pages holding the entered form data. Now you can further process the form data like showing a success page and emailing the form data.
  4. Things that I came across about creating/editing pages with the api: 1) Set output formatting state off, for page manipulation $page->of(false); 2) First save page in preparation for adding files e.g. an image $p->save(); So allow me to add 1) here to improve the above example code: <?php if($input->post->submit) { $p = new Page(); $p->of(false); $p->template = "template_to_save_form"; $p->parent = $pages->get("/parent-page/"); $p->title = $input->post->name . " - " . date("Y-m-d"); $p->submitted_by = $input->post->name; $p->message = $input->post->message; $p->save(); }
  5. @fbg13 This is exactly what is needed to know when starting to use $page api with a html form Big thanks for posting this.
  6. Hi, I am using the core Comments fieldtype in Processwire. It has the default Form input labels Name, Email and Text. This question has been asked before but I found no answer in the Forum section. How can I add extra input labels to the Comments Form such as Country, Year. etc ?
  7. Hi, I evaluated the updated ProfileExport Module v4.0.1 I get the same error as JeevanisM: Profile not found I checked for any special characters in my profile name, files that should be there and permissions on the server I am using Processwire 3.0.184 Anyone have an idea ?
  8. Hi Ryan, Big thanks for doing this, as it adds to beginners friendly and jump start with Processwire. Merry christmas to the Processwire Family
  9. How many processwire users find this NOT useful ? Some user base polling or voting would be on its place. For so many years having these profiles out of the box added to beginners friendly and jump start with processwire.
  10. You can keep on using UIKit but it is not a silver bullet solution for any situation. Find any mobile menu/accordion navigation on jqueryscript dot net for free with code examples, and demos ready for you to use with processwire. Have a look here: https://www.jqueryscript.net/
  11. 1) What about keeping the main layout styling in vanilla css and put only utility classes for final layout tweaking ? That would give you the best of 2 worlds ! 2) Having said that, how many percent of all the available tailwind utility classes are really going to be used ? Certainly not all of them in every website you make, let's say 40% - 50% - 60% ? 3) That brings me to the idea to sort out only the most useful ideas and classes from Bulma, Spectre and Bootstrap and bring them in your own utility class framework. That would make things certainly more effective. How much time would that take ? Sticking to only essential and useful classes, not that long.
  12. I have been following tailwind css for a while. Can't help it but having so many classes in a tag really clutters up your html. What has become wrong with vanilla css ?
  13. I can't believe no one is mentioning PHPED from Nusphere http://www.nusphere.com/products/index.htm Yes it costs money but so what if you really get something good.
  14. Hi Mikeindee Thanks for letting know about the Raspberry operating system. A friend and me want to start setting up our own server with a Raspberry 4. We will see how far it will take us.
  15. What operating system version is running on that Raspberry ? Did you install that operating system your self ?
  16. Ever worked with VirtualBox, VMWare, Proxmox, other ? You build only once a virtualmachine with all your preferred programs, languages, libraries, tools, utilities, components, snippets, etc. etc. You use that virtualmachine as a Template. After that it is simply cloning the Template for each Project. It's like having multiple laptops in a single laptop 😉
  17. I do not have Windows since I am not fond of it either. We'll you can't beat Laragon5, HeidiSQL and WinSCP when it comes to Windows 😏 I manage every project in it's own virtualmachine, I run every virtualmachine from a simple usb3 2Tb external hdd ... all very practical.
  18. That is why I like VirtualMachines. It let's you bring together the best of different worlds. Oracle VirtualBox is there for Windows, Linux and for Mac also. https://www.virtualbox.org/wiki/Downloads
  19. I am a Laragon5 User + HeidiSQL + WinSCP , all 3 in a virtual machine, saves me a lot of time , fast, powerful, stable ... and for free
  20. Perfect design/photos/fonts/colors just one thing: https://clinicatrust.pt/contactos/ This page can't load Google Maps correctly Do you own this website?
  21. Another very good example of how to handle parts of a website efficiently in processwire "as a page" I was building a website from scratch lately and was fiddling my css around to look for a way to get it better organized. And then came across this post from Diogo again: https://processwire.com/talk/topic/2210-help-getting-a-custom-styles-php-file-working/?do=findComment&comment=20641
  22. Congratulations, very original design that really stands out from the crowd.
  23. I was addressing your first question This is a different question Have you read the Processwire Documentation ? Your answers are here: https://processwire.com/docs/start/variables/templates/ --------------------------------------------------------------------- Creating a new template with api <?php namespace ProcessWire; $fieldgroup = new Fieldgroup(); $fieldgroup->name = "something"; $fieldgroup->add("title"); // add some fields $fieldgroup->add("body"); $fieldgroup->add("summary"); $fieldgroup->save(); $template = new Template(); $template->name = "something"; // must be same name as the fieldgroup $template->fieldgroup = $fieldgroup; $template->save(); --------------------------------------------------------------------- Adding fields to a template with api <?php namespace ProcessWire; $template = $templates->get("some_template"); $template->fields->add("body"); // add some fields $template->fields->add("summary"); $template->fields->add("images"); $template->fields->save(); --------------------------------------------------------------------- Forum https://processwire.com/talk/topic/4921-how-to-create-template-file-using-api-under-a-module/ https://processwire.com/talk/topic/352-creating-pages-via-api/ Examples https://processwire-recipes.com/recipes/add-fields-to-template/ Beginner mistakes https://processwire.com/talk/topic/19415-trying-to-create-field-using-api/
  24. Have you seen the processwire documentation ? https://processwire.com/api/ref/field/ 1) Setup a field of type textarea 2) Echo or include the textarea field where you want it echo $Yourpage->yourfield; include $Yourpage->yourfield;
  25. There are form tutorials you can find in the forum that you can use for what you need.
×
×
  • Create New...