Forum Replies Created
-
AuthorPosts
-
ben06
ParticipantThank again Long for your valuable help!
It worked when I determined the max number of input variables of the project, inserting:
php_value max_input_vars 10000
in the <Ifmodule> tags of the .htaccess file of my project.August 25, 2022 at 9:20 PM in reply to: ✅Error while inserting $field_id in rwmb_after_save_post #38050ben06
ParticipantThx a lot again, both of you Long and Kevin! 😉
August 23, 2022 at 10:42 PM in reply to: ✅Error while inserting $field_id in rwmb_after_save_post #37991ben06
ParticipantThanks a lot for your knowledge and your time! 😉
August 22, 2022 at 2:14 PM in reply to: ✅Error while inserting $field_id in rwmb_after_save_post #37964ben06
ParticipantOf course, here's the part of the MetaBox used for that:
[ 'name' => __( 'Group', 'kallyas' ), 'id' => $prefix . 'pieces_jointes_et_dates', 'type' => 'group', 'collapsible' => true, 'default_state' => 'expanded', 'save_state' => true, //'group_title' => 'Pièce intitulée {pieces_jointes}, importée le: '. '{date_fichier}', 'group_title' => 'Importée le: {date_fichier}', 'clone' => true, //'clone_default' => false, //'clone_as_multiple' => false, 'sort_clone' => true, 'clone_default' => false, 'add_button' => esc_html__( 'Ajouter une autre pièce jointe', 'kallyas' ), 'fields' => [ [ 'name' => __( 'Pièce(s) jointe(s)', 'kallyas' ), 'id' => $prefix . 'pieces_jointes', 'type' => 'file_upload', ], [ 'name' => __( 'Date de dépôt du fichier', 'kallyas' ), 'id' => $prefix . 'date_fichier', 'type' => 'bs_date', //'std' => 'Entrez ici la date de saisie de la pièce', 'js_options' => array( 'format' => "dd/mm/yyyy", 'endDate' => "today", 'startView' => 0, 'minViewMode' => 0, 'maxViewMode' => 2, ), 'required' => 1, ], ], ],ben06
ParticipantThank you it works well!
ben06
ParticipantHi,
Thank you for your answer.
Where do I have to add the condition ?
The condition is : if post_status = publish {$mark = true}$meta_boxes[] = [ 'title' => esc_html__( 'Signature', 'text-domain' ), 'id' => 'signature', 'post_types' => ['docs'], 'context' => 'normal', 'priority' => 'high', 'fields' => [ [ 'id' => $prefix . 'signature_appli', 'name' => "Signature", 'type' => 'password', ], ], 'validation' => array( 'messages' => array( 'signature_appli' => array( 'required' => 'You have to sign.', ), ), ), 'visible' => array( 'when' => array( array( 'post_status','=', 'attente_app'), array( 'post_status','=', 'publish') ), 'relation' => 'or' ), ];ben06
ParticipantThank you for the screen record.
It's working well on back end but I need to get the post id when I submit the front end form trough a shortcode.
As I said, i can't get the post id from $_GET because I use a plugin and the url is modified.
I think I have to retrieve the post id with a global.ben06
ParticipantHi,
Yes I tried the code but it still not working...
I also tried this :
$test = $GLOBALS['post']->ID;The variable retrieves the good post id but it's not working as a value...
ben06
ParticipantHi,
Yes I tried the code but it still not working...
How is that possible?
ben06
ParticipantHere is the code that creates the metabox :
ben06
ParticipantHi,
Thank you for the answer.
But this is not working...
I'm using a plugin (Betterdocs), maybe that is the reason why it is not working.The URL is xxxxxx.com/docs/doc-1/
But when I try to echo the post ID on the layout page of the plugin, it is working well.
Any other ideas ?
ben06
ParticipantThank you for your answer!
-
AuthorPosts