• arturocivit

    (@arturocivit)


    Hi there Takayuki, quick question, is there a way to make a select required? I mean, I know there is one by adding “” or adding include_blank but from the user experience point of view, by adding any of those 2 options leave me the select with no instructions on what to do next, for example, I’d love to have as a first option something like “select an option in order to contact us” or something like that, something that indicates what’s going on on that select ro the action to take, when I add the “” it works because it makes the select required but it is empty and I need to click to see what’s going on, when I use include_blank it works but outputs a “…” that doesn’t tell anything to the client, any idea?

    Thanks so much!

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter arturocivit

    (@arturocivit)

    Oh, not sure if this is going to work, but what about if I go here:

    if ( $include_blank || empty( $values ) ) {
    		array_unshift( $labels, '---' );
    		array_unshift( $values, '' );
    		$shifted = true;
    	} elseif ( $first_as_label ) {
    		$values[0] = '';
    	}

    and change the value of — ? Does that is going to work?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    First, read this: Checkboxes, Radio Buttons and Menus

    select* is the required version of select. With first_as_label option, it uses the first value as a label.

    Thread Starter arturocivit

    (@arturocivit)

    Hi there, yes, i know, in fact this is the code referring to the select:

    [select* menu-629 include_blank “Me interesa un producto pero tengo algunas preguntas|[email protected]” “Quiero adquirir uno de los productos|[email protected]” “Ya soy cliente y tengo algunas inquietudes|[email protected]” “Otro|[email protected]”]

    But the include_blank it is outputting — and I just need something more easy to understand, can I change the value of — on the code above in my precious message?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Select not being required’ is closed to new replies.