• Hello, I resctric 3 choices on checkbox profil and when the user choice more 3, the error come on bottom.

    How to display on top nex the title choice checkbox

    Thanks for your help

    Michel

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @kikobyofficial

    Do you mean this error message: https://prnt.sc/L4-FcEVCNe5_

    You can use custom CSS code to reorder elements into the field:

    .um-field.um-field-checkbox {
    display: flex;
    flex-direction: column;
    }
    .um-field.um-field-checkbox .um-field-label {
    order: 1;
    }
    .um-field.um-field-checkbox .um-field-area {
    order: 3;
    }
    .um-field.um-field-checkbox .um-field-error {
    order: 2;
    }

    Example: https://prnt.sc/laPAwsXWXy2w

    You can add CSS code to the style.css file in the child theme. You also can add CSS code to the field “Additional CSS” on wp-admin > Appearance > Customize > Additional CSS if your theme supports this feature.

    Regards

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello thanks very much works well

    Michel

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello, I want to know if there is way to display in popup the error text ?

    Michel

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hi @kikobyofficial

    There is no way to display errors in popup.

    You can use a code to display errors, see doc Display all form errors below the form. Wrapping errors into popup requires more customization. Try this code:

    add_action( 'um_after_form', 'um_display_all_form_errors' );
    function um_display_all_form_errors( $args = array() ) {
    if ( ! empty( UM()->form()->errors ) ) {
    $error_text = wp_strip_all_tags( implode( ' ', UM()->form()->errors ) );
    ?>
    <div id="um_form_errors" style="display:none;">
    <a href="javascript:void(0);" data-action="um_remove_modal" class="um-modal-close" aria-label="Close"><i class="um-faicon-times"></i></a>
    <div class="um-modal-header">Form errors</div>
    <div class="um-modal-body"><?php echo $error_text; ?></div>
    </div>
    <script type="text/javascript">
    jQuery( window ).load( function() {
    um_new_modal( 'um_form_errors', 'normal', false, '' );
    } );
    </script>
    <?php
    }
    }

    Regards

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello, I try to add but doesnt works, no display the popup

    Thanks

    Michel

    Thread Starter kikobyofficial

    (@kikobyofficial)

    hello, now its working its great thanks again very much

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello, if I can ask you something, when there is more than 1 error, can break the line for see each error by line ??

    Thanks

    Michel

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @kikobyofficial

    Yes, you can. Change the first parameter in the implode function. This parameter is a separator between strings. Try this code:

    add_action( 'um_after_form', 'um_display_all_form_errors' );
    function um_display_all_form_errors( $args = array() ) {
    if ( ! empty( UM()->form()->errors ) ) {
    $error_text = implode( '<br>', UM()->form()->errors );
    ?>
    <div id="um_form_errors" style="display:none;">
    <a href="javascript:void(0);" data-action="um_remove_modal" class="um-modal-close" aria-label="Close"><i class="um-faicon-times"></i></a>
    <div class="um-modal-header">Form errors</div>
    <div class="um-modal-body"><?php echo $error_text; ?></div>
    </div>
    <script type="text/javascript">
    jQuery( window ).load( function() {
    um_new_modal( 'um_form_errors', 'normal', false, '' );
    } );
    </script>
    <?php
    }
    }

    Regards

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello, thanks very much.

    Just its great but on register display few line error with same text ( field is required ) so maybe its possible to display error from ID or maybe use this popup for only my default profile [ultimatemember form_id=”64″]

    On login its great because the error come with the ID name but not for register

    Thanks very much

    Regards

    Michel

    Thread Starter kikobyofficial

    (@kikobyofficial)

    Hello, I do it by fill the field label on register form and display this in css

    label[for=”user_email-908″]
    {
    display:none;
    margin: 0px 0 0px 0px !important;
    }

    Tell if its OK ?

    Thanks

    Regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.