Forum Replies Created
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
Steffen Larsen
ParticipantBut then the validate message doesn't show?
I just wanna redirect to the form like this (it stays on the same site, but scrolls to the form) https://www.sikkerfangst.dk/produkt/en-ordentlig-fiskestang#auktionsbud
Your example works, but then the message doesn't show.
Steffen Larsen
ParticipantYes i tried it, but i had a fieldgroup with the same names. I deleted them, but maybe it's the problem. Maybe i should start over and test it on a fresh install. But thanks anyway.
Steffen Larsen
ParticipantNope it still doesn't save anything but the last. I tried everything in the docs.
Steffen Larsen
Participant"Produkttype", "Betalingsmidler", "Forsendelsesmuligheder" only the last one gets saved.
Steffen Larsen
Participant<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Produkt info', 'your-text-domain' ), 'id' => 'produkt-info', 'post_types' => ['produkt'], 'fields' => [ [ 'name' => __( 'Produkttype', 'your-text-domain' ), 'id' => $prefix . 'produkttype', 'type' => 'taxonomy', 'taxonomy' => ['category'], 'field_type' => 'select_advanced', 'remove_default' => true, 'required' => true, 'query_args' => [ 'child_of' => 4, ], ], [ 'name' => __( 'Dage på auktion', 'your-text-domain' ), 'id' => $prefix . 'dage_paa_auktion', 'type' => 'number', 'max' => 21, 'append' => 'Dage', 'visible' => [ 'when' => [['produkttype', '=', 7]], 'relation' => 'or', ], ], [ 'name' => __( 'Startpris', 'your-text-domain' ), 'id' => $prefix . 'startpris', 'type' => 'number', 'min' => 0, 'max' => 100000, 'append' => 'DKK', 'visible' => [ 'when' => [['produkttype', '=', 7]], 'relation' => 'or', ], ], [ 'name' => __( 'Bud step', 'your-text-domain' ), 'id' => $prefix . 'bud_step', 'type' => 'number', 'max' => 500, 'visible' => [ 'when' => [['produkttype', '=', 7]], 'relation' => 'or', ], ], [ 'name' => __( 'Max Pris', 'your-text-domain' ), 'id' => $prefix . 'max_pris', 'type' => 'number', 'min' => 0, 'max' => 100000, 'append' => 'DKK', 'visible' => [ 'when' => [['produkttype', '=', 5]], 'relation' => 'or', ], ], [ 'name' => __( 'Pris', 'your-text-domain' ), 'id' => $prefix . 'pris', 'type' => 'number', 'min' => 0, 'max' => 100000, 'visible' => [ 'when' => [['produkttype', '=', 6]], 'relation' => 'or', ], ], [ 'name' => __( 'Beskrivelse', 'your-text-domain' ), 'id' => $prefix . 'beskrivelse', 'type' => 'textarea', 'required' => true, ], [ 'name' => __( 'Billeder', 'your-text-domain' ), 'id' => $prefix . 'billeder', 'type' => 'image_upload', 'max_file_uploads' => 4, ], [ 'name' => __( 'Betalingsmidler', 'your-text-domain' ), 'id' => $prefix . 'betalingsmiddel', 'type' => 'taxonomy', 'taxonomy' => ['category'], 'field_type' => 'select_advanced', 'remove_default' => true, 'multiple' => true, 'required' => true, 'query_args' => [ 'child_of' => 36, ], ], [ 'name' => __( 'Forsendelsesmuligheder', 'your-text-domain' ), 'id' => $prefix . 'forsendelsesmulighed', 'type' => 'taxonomy', 'taxonomy' => ['category'], 'field_type' => 'select_advanced', 'remove_default' => true, 'multiple' => true, 'required' => true, 'query_args' => [ 'child_of' => 28, ], ], [ 'name' => __( 'Auktionen er slut', 'your-text-domain' ), 'id' => $prefix . 'auktionen_er_slut', 'type' => 'switch', 'style' => 'rounded', 'on_label' => 'Ja', 'off_label' => 'Nej', 'attributes' => [ 'readonly' => true, ], 'visible' => [ 'when' => [['produkttype', '=', 7]], 'relation' => 'or', ], ], ], ]; return $meta_boxes; } -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)