Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 151 through 165 (of 245 total)
  • Author
    Posts
  • in reply to: Outputting user value in array #37314
    YasmineYasmine
    Participant

    Thank you Long, I appreciate it. There are two fields

    Academic position:

    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'  => __( 'Profile: Academic Profile', 'your-text-domain' ),
            'id'     => 'academic_profile',
            'type'   => 'user',
            'fields' => [
                [
                    
                [
                    'name'          => __( 'Academic Position', 'your-text-domain' ),
                    'id'            => $prefix . 'academic_position',
                    'type'          => 'select',
                    'options'       => [
                        'Distinguished Professor' => __( 'Distinguished Professor', 'your-text-domain' ),
                        'Honorary Professor'      => __( 'Honorary Professor', 'your-text-domain' ),
                        'Professor'               => __( 'Professor', 'your-text-domain' ),
                        'Associate Professor'     => __( 'Associate Professor', 'your-text-domain' ),
                        'Assistant Professor'     => __( 'Assistant Professor', 'your-text-domain' ),
                        'Senior Lecturer'         => __( 'Senior Lecturer', 'your-text-domain' ),
                        'Lecturer'                => __( 'Lecturer', 'your-text-domain' ),
                        'Associate Lecturer'      => __( 'Associate Lecturer', 'your-text-domain' ),
                        'Junior Lecturer'         => __( 'Junior Lecturer', 'your-text-domain' ),
                        'Postdoctoral Researcher' => __( 'Postdoctoral Researcher', 'your-text-domain' ),
                        'PhD Researcher'          => __( 'PhD Researcher', 'your-text-domain' ),
                        'Reader'                  => __( 'Reader', 'your-text-domain' ),
                        'Senior Research Fellow'  => __( 'Senior Research Fellow', 'your-text-domain' ),
                        'Research Fellow'         => __( 'Research Fellow', 'your-text-domain' ),
                        'Research Assistant'      => __( 'Research Assistant', 'your-text-domain' ),
                        'Research Consultant'     => __( 'Research Consultant', 'your-text-domain' ),
                        'Researcher'              => __( 'Researcher', 'your-text-domain' ),
                        'Journalist'              => __( 'Journalist', 'your-text-domain' ),
                        'Writer'                  => __( 'Writer', 'your-text-domain' ),
                    ],
                    'admin_columns' => 'after title',
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    And academic_title

    
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'  => __( 'Profile: About You', 'your-text-domain' ),
            'id'     => 'basic_profile',
            'type'   => 'user',
            'fields' => [
                [
                    'name'    => __( 'Academic Title', 'your-text-domain' ),
                    'id'      => $prefix . 'academic_title',
                    'type'    => 'select_advanced',
                    'options' => [
                        'Dr'        => __( 'Dr', 'your-text-domain' ),
                        'Professor' => __( 'Professor', 'your-text-domain' ),
                    ],
                    'columns' => 2,
                ],
    

    And hard to share screenshot (although still can), but here is a copy and paste:

    array(1) { [0]=> string(2) "Dr" }
    NICE Test
    array(1) { [0]=> string(18) "Associate Lecturer" }

    in reply to: Draft button #37274
    YasmineYasmine
    Participant

    Perfect, thank you. Very clear.

    in reply to: Form submission redirect to preview custom URL #37267
    YasmineYasmine
    Participant

    Resolved.

    in reply to: Form submission redirect to preview custom URL #37261
    YasmineYasmine
    Participant

    Ok potentially worked this out. For the edit button, I have it working: https://www.mydomain.org/my_summary_page/?rwmb_frontend_field_post_id=35022 (and I then write the first bit of the link and then use a shortcode to output the post id)

    However, for the preview I am struggling a little. As I need to output the post id within a shortcode: https://www.mydomain.org/?post_type=research&p=35022 almost like 'https://www.mydomain.org/?post_type=research&p='.$post->id.' - how do I do this in an MB shortcode so I have a dynamic redirect?

    YasmineYasmine
    Participant

    Thank you Long!!!

    in reply to: Change Post Status With a Button #37239
    YasmineYasmine
    Participant

    Hi John,

    What was your workaround? Did you manage to do with a button (rather than a switch) ?

    in reply to: How to make the illusion of a multistep form #36587
    YasmineYasmine
    Participant

    Hi Long, do you have any idea whether it would be weeks or months. Only asking as will need to get working on a temp solution if months. I understand everything takes time, but knowing the rough time frame would help a lot.

    in reply to: Order relationship Options by ASC #36429
    YasmineYasmine
    Participant

    Thanks Long, I am up to date with the latest MB AIO - but still face the same issue. I have tried to delete re-add etc..

    Currently I am just adding orderby and order into the query_args on the relationship. I have also additionally added it into settings in custom fields. But with this too, it still is not working.

    Is there something I am missing? Or could I have a setting that is overwriting this?

    Many thanks!

    in reply to: Saving taxonomies to user #36427
    YasmineYasmine
    Participant

    Oh thats great!

    And quick follow up question - when creating the taxonomy, does it matter the location where its saved? I assume not, but just wanting to check. I was choosing to attach it to my regular WP posts.

    Thanks Long!

    in reply to: Order relationship Options by ASC #36408
    YasmineYasmine
    Participant

    Hi Long,

    Still can't get this one working. I think that I did not get the commit working, as the php code does not look right:

    <?php
    add_action( 'mb_relationships_init', 'your_prefix_function_name' );
    
    function your_prefix_function_name() {
        MB_Relationships_API::register( [
            'id'   => 'university_user',
            'from' => [
                'object_type' => 'post',
                'post_type'   => 'university',
                'field'       => [
                    'query_args' => [
                        '5w1x2lx5oq7' => [
                            'id'    => '5w1x2lx5oq7',
                            'key'   => 'orderby',
                            'value' => 'title',
                        ],
                        'og7o0qgfecd' => [
                            'id'    => 'og7o0qgfecd',
                            'key'   => 'order',
                            'value' => 'ASC',
                        ],
                    ],
                    'max_clone'  => '1',
                ],
            ],
            'to'   => [
                'object_type' => 'user',
                'post_type'   => 'post',
                'taxonomy'    => 'category',
                'field'       => [
                    'query_args' => [
                        'iqoxqzev60p' => [
                            'id'    => 'iqoxqzev60p',
                            'key'   => 'orderby',
                            'value' => 'title',
                        ],
                        'mo9n62730iq' => [
                            'id'    => 'mo9n62730iq',
                            'key'   => 'order',
                            'value' => 'ASC',
                        ],
                    ],
    in reply to: Compatibility with WP Mail SMTP ? #36407
    YasmineYasmine
    Participant

    This worked, thank you!

    in reply to: How to make the illusion of a multistep form #36406
    YasmineYasmine
    Participant

    Hi Khaz,

    I'll give it a try. Thank you for sharing!

    in reply to: Compatibility with WP Mail SMTP ? #36336
    YasmineYasmine
    Participant

    The redirect is in my shortcode, not in this code. But I will remove die;. Thank you.

    in reply to: Compatibility with WP Mail SMTP ? #36324
    YasmineYasmine
    Participant

    Ok you are right. When the plugin was deactivated, the issue remained.

    But I did find the issue, when I deactivated this snippet, the redirect worked again:

    add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) {
        if ( 'research-summary' === $config['id'] ) {
            wp_mail( '$myemail', 'Summary pending', 'A new research summary has been just submitted:
    		Dashboard:$mydashboardlink 
    		Google drive link: $linktoagoogledrive' ); //have replaced the links purposely with $ 
            die;
        }
    }, 10, 2 );

    Is it because this is overriding the action to redirect? And how would I fix this?

    in reply to: How to make the illusion of a multistep form #36294
    YasmineYasmine
    Participant

    Hi Long,

    Oh that would really be great. I will eagerly await the update! I thought it might have been simple using conditional logic. Will this feature be announced when it's ready? Want to make sure I don't miss it!

    Oh ok, I had actually found that snippet, but had been trying with a button.

    I also can't get it working... I am trying to use it with the checkbox, and when I check it and click "submit" it does not then let me. This is because not all the required fields have been filled. But the purpose of saving as draft is so that they can go back to work on it. When the button is clicked nothing happens to reassure the user that it has been saved. I would rather a button that can show next to the main submit button. "Draft" and "submit" - is there any way to achieve that?

    Many thanks!

Viewing 15 posts - 151 through 165 (of 245 total)