Forum Replies Created
-
AuthorPosts
-
SteveKeymaster@marcusing– Great job!
Here’s a Pro Tip: Everything in Piklist is dynamic, including the underscore in the $_POST object. “_” is set as
piklist::$prefix, but can be changed if you want to:So instead of:
$form_id = $_POST['_']['form_id'];
Use this:
$form_id = $_POST[piklist::$prefix]['form_id'];
Just keeps things future proof.
SteveKeymasterThis is a more general WordPress issue, not really Piklist, so you should be able to use any WordPress solution. Take a look at these plugins:
December 9, 2015 at 10:47 am in reply to: More than one file upload field in add_more group fails to save #5273
SteveKeymaster@oakwood– You can narrow it down by using
piklist_save_field-{$scope}. The $scope would be your setting.So, if your registered setting was ‘my_setting’, you would hook into
piklist_save_field-my_setting.
SteveKeymaster@jcrist– We plan on adding this feature in now that we have the server-side validation working. Right now we’re working on the next version of Piklist. Unfortunately, feature requests are going to have to wait a bit.
December 8, 2015 at 11:59 am in reply to: More than one file upload field in add_more group fails to save #5263
SteveKeymasterHi Björn– Try using our latest beta. I believe it will fix your issues.
SteveKeymasterAnd you tried adding this to your form?
piklist('field', array( 'type' => 'hidden' ,'scope' => 'post' ,'field' => 'post_type' ,'value' => 'student' // this is the Post type ));
SteveKeymaster@jcrist– This is fixed in the next version of Piklist. Pushing to get it out in a few weeks.
SteveKeymaster@jcrist– The Javascript version is. But the PHP version works beautifully and is in the Demos under the Validation tab.
SteveKeymaster@oakwood– Piklist is VERY alive and VERY active!
Take a look at the latest beta, v0.9.9.x. There are lots of new hooks and filters.
SteveKeymaster@anthonyabraira– Though we love to help as much as possible, we’d appreciate if you could keep your questions Piklist related. This is a general WordPress question.
December 7, 2015 at 12:34 pm in reply to: How to display add more field in oder detail page of woocommerce #5250
SteveKeymasterJust took another look at this I think I understand the issue. Your original field configuration is incorrect. If you open the Piklist plugin and look at this file in the demos you’ll understand how to do this:
piklist/add-ons/piklist-demos/parts/forms/new-post-with-validation.phpTry this:
// Save field to this post_type piklist('field', array( 'type' => 'hidden' ,'scope' => 'post' ,'field' => 'post_type' ,'value' => 'shop_order' )); piklist('field', array( 'type' => 'file' ,'scope' => 'post_meta' // scope needs to be set on EVERY field for front-end forms. ,'field' => 'upload_order_attch' ,'label' => Add File(s)' ,'description' => 'You can add image files or zip file with all images in it.' ,'add_more' => true ,'options' => array( 'modal_title' => __('Add File(s)', 'piklist-demo') ,'button' => __('Add', 'piklist-demo') ,'basic' => true ) ));
SteveKeymaster@kabadabra– Welcome to the Piklist community!
Glad you were able to solve this. Let us know if you need any more help.
SteveKeymasterSo, with each add_more you want the data to be saved to a different post_type?
-
AuthorPosts