Jump to content

Search the Community

Showing results for tags 'end'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. TL;DR : I'm looking to create dynamic forms which will take fields list from given template & create/save pages dynamically. Hello, I've been using PW for a while for creating web applications like ERP systems and similar applications which have tons of forms. So far I've been creating, processing & validating them manually. While researching I found this link which I found to be very helpful. Code given in that example allows user to create a form based on the fields of any page and save it, which is very cool. Based on that code I tried doing something like this: $p = new Page(); $p->template = "mytemplate"; //I've added few fields to this template $p->parent = "/someparent/"; $p->of(false); // make a form $form = $modules->get('InputfieldForm'); $form->method = 'post'; $form->action = './'; // add the page's fields to the form $form->add($p->getInputfields()); // add a submit button to the form $submit = $modules->get('InputfieldSubmit'); $sumit->name = 'submit'; $form->add($submit); // process the form if it was submitted if($input->post->submit){ $form->processInput($input->post); $p->name = date(dmYhisn); $p->save(); } It did create a page but without any data. I know this could be a very stupid thing to try, but I guess it was worth it. More research taught me that probably using ProcessPageAdd module I can create new pages. But I don't know how exactly that works. I'm looking for some guidance about modules & their use on fron-end. Thanks.
×
×
  • Create New...