ZionBludd Posted May 9, 2015 Share Posted May 9, 2015 I am wanting to save pages via a form input. I've done a fair amount of searching, and am struggling to find a working solution. Primarily my knowledge falls under web design, and this web development (PHP, PW, etc) is new territory for me. If i was starting below, how would I tie it all together with a form? $p = new Page(); // create a new page $p->template = 'reviews_template'; // choose template $p->parent = wire('pages')->get('/gyms/'); // choose parent page $p->title = $sanitizer->text($input->get->title); // clean user input and set title $p->a_field = $sanitizer->text($input->get->field); // clean user input and set a custom field $p->save(); // save the page Link to comment Share on other sites More sharing options...
arjen Posted May 9, 2015 Share Posted May 9, 2015 Hi, everyone started somewhere. It's really easy once you have done it a few times. Check out this legendary post. Or use FormBuilder. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now