Support Forum » User Profile

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Map field default location in clonable group....via AJAX? #45871
    Andrew_VincentAndrew_Vincent
    Participant

    ^^ Just to clarify my comment above... I'm not trying to edit the CPT in the back-end, but have noticed that its not possible to view the CPT - i'm guessing because of the way the CPT is defined when created by the front-end-form..? And if it's not viewable, I don't see how it can be editable.

    Does that make sense?

    in reply to: Map field default location in clonable group....via AJAX? #45870
    Andrew_VincentAndrew_Vincent
    Participant

    Thanks - that makes sense.

    It looks like the CPT thats created on submit can't be viewed. I can view it in the back end but there is no 'View EoI" button. Is that necessary? or is the cpt content somehow appended to the confirmation message?

    Should the redirect on submit be directed to the cpt URL?

    Andrew_VincentAndrew_Vincent
    Participant

    Can you please confirm that I placed 'edit' => true in the right place?

    Andrew_VincentAndrew_Vincent
    Participant

    My code looks like this:

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
    
    	$meta_boxes[] = array (
    		'title' => 'Submit Paddock',
    		'id' => 'submit_paddock_form_vic',
            'post_types' => 'eoi',
            'edit' => true,
            'validation'    =>  [
                'rules' =>  [
                                'phone' => [
                                            'required' => true,
                                            ],
                                'full_name' => [
                                            'required' => true,
                                            ],
                                'email' => [
                                            'required' => true,
                                            ],
                            ]
    
            ],
    		'fields' => [
                [
                    'id'    =>  'recipients',
                    'type'  =>  'hidden',
                    'std'  => '[email protected],[email protected]',
                    'std'  => '[email protected]',
                ],
                [
                    'name'  =>  'Full Name',
                    'id'    =>  'full_name',
                    'type'  => 'text',
                ],
                [
                    'name'  =>  'Contact Phone',
                    'id'    =>  'phone',
                    'type'  => 'text',
                ],
                [
                    'name'  =>  'Contact Email',
                    'id'    =>  'email',
                    'type'  => 'text',
                ],
                [
                    'name'  =>  'NGR',
                    'id'    =>  'ngr',
                    'type'  => 'text',
                ],
                [
                    // 'name'   => 'Add a paddock', 
                    'id'     => 'paddock_group',
                    'type'   => 'group',
                    'clone'  => true,
                    'collapsible' => true,          // Column size (1-12)
                    'class' => 'paddock_picker',
                    'group_title' => 'Paddock {#}',
                    'group_title' => ['field' => 'paddock_name'],
                    'add_button' => '+ Add a paddock',
                    'fields' => [
    
                                    [
                                        'name'  =>  'Paddock Location',
                                        'id'    =>  'paddock_location',
                                        'desc'  =>  'Select the satellite view then drag the marker whilst zooming in to locate your paddock.',
                                        'type'  => 'map',
                                        'api_key'   => 'AIzaSyBUtodUtVKW1VJa9Gmzz2-VuQuwd7A7GLQ',
                                        'std'   => '-35.3453808,143.5625836,7',
                                        'clone_default' => true,
                                        'js_options' => [
                                            'mapTypeId'   => 'SATELLITE',
                                        ],
                                    ],
                                    [
                                        'name'  =>  'Paddock Name',
                                        'id'    =>  'paddock_name',
                                        'type'  => 'text',
                                    ],
                                    [
                                        'name'  =>  'Crop Type',
                                        'id'    =>  'crop_type',
                                        'type'  => 'select',
                                        'options'   => [
                                            'wheat'     => 'Wheat',
                                            'barley'    => 'Barley',
                                            'feed_corn'    => 'Corn',
                                        ],
                                        'placeholder'   => 'Select a crop',
                                    ],
                                    [
                                        'name'  =>  'Variety',
                                        'id'    =>  'variety',
                                        'type'  => 'text',
                                    ],
                                    [
                                        'name'  =>  'Plantable Hectares',
                                        'id'    =>  'plantable_hectares',
                                        'type'  => 'text',
                                    ],
                                    [
                                        'name'  =>  'Delivery Location',
                                        'id'    =>  'delivery_location',
                                        'type'  => 'text',
                                    ],
                    ],
                ],
            ]
        );
        
    	return $meta_boxes;
    });
    Andrew_VincentAndrew_Vincent
    Participant

    No I think you're not understanding. The user would need to input multiple markers on a map - I don't believe that's possible.

    I should theoretically be able add multiple maps to a single submission if I set the form to 'edit' => true. The newly created submission post could store the co-ordinates and set that as the default for subsequent map additions. Unfortunately the documentation on this is extremely poor so incredibly difficult to work out how to do it. https://docs.metabox.io/extensions/mb-frontend-submission/

    If I set edit to true it returns a blank page on submission. How do I set the redirect to view the newly created submission post?

    Andrew_VincentAndrew_Vincent
    Participant

    Another possibility would be to add to an existing form submission post. ie map for one paddock submits; subsequent paddocks retrieve default Zoom and Location from the submission CPT Location field.

    ... does that make sense?

    Andrew_VincentAndrew_Vincent
    Participant

    Thanks. Is it possible to maybe add multiple markers to a single map?

    in reply to: How to access older versions of extensions #40055
    Andrew_VincentAndrew_Vincent
    Participant

    Looking for an older version of AIO. The new version is throwing an error and taking down my site completely. Unfortunately I do not have access to the server's CPanel and cannot upgrade the PHP version to the minimum spec

    in reply to: Can't get custom profile image to show. #32342
    Andrew_VincentAndrew_Vincent
    Participant

    Ah thanks.

Viewing 9 posts - 1 through 9 (of 9 total)