Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18976

    Hi

    I’ve got two questions regarding contact form:

    1. Is it possible to move labels above input text fields instead of right of field?

    2. Is it possible to determine what info gets sent back to receiver, for example I don’t want to send the items unchecked that read false.

    Thank you

    NayLee

    #101563

    Hi NayLee,

    For #1, kindly edit: wp-contentthemeseunoiaframeworkphpclass-form-generator.php and find the ff. code blocks:

    line 162

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= ' <input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
    $this->elements_html .= "</p>";

    replace with:

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= '<label for="'.$id.'">'.$element['label'].$required.'</label><input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/>';
    $this->elements_html .= "</p>";

    line 189

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= ' <input '.$checked.' name="'.$id.'" class="input_checkbox '.$element_class.'" type="checkbox" id="'.$id.'" value="true"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
    $this->elements_html .= "</p>";

    replace with:

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= '<label for="'.$id.'">'.$element['label'].$required.'</label><input '.$checked.' name="'.$id.'" class="input_checkbox '.$element_class.'" type="checkbox" id="'.$id.'" value="true"/>';
    $this->elements_html .= "</p>";

    line 236

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= ' <select name="'.$id.'" class="select '.$element_class.'" id="'.$id.'">'.$select.'</select><label for="'.$id.'">'.$element['label'].$required.'</label>';
    $this->elements_html .= "</p>";

    replace with:

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= '<label for="'.$id.'">'.$element['label'].$required.'</label><select name="'.$id.'" class="select '.$element_class.'" id="'.$id.'">'.$select.'</select>';
    $this->elements_html .= "</p>";

    line 320

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= " <span class='value_verifier_label'>$number_1 + $number_2 = ?</span>";
    $this->elements_html .= ' <input name="'.$id.'_verifier" type="hidden" id="'.$id.'_verifier" value="'.$valueVer.'"/>';
    $this->elements_html .= ' <input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/><label for="'.$id.'">'.$element['label'].$required.'</label>';
    $this->elements_html .= "</p>";

    replace with:

    $this->elements_html .= "<p class='".$p_class."' id='element_$id'>";
    $this->elements_html .= " <span class='value_verifier_label'>$number_1 + $number_2 = ?</span>";
    $this->elements_html .= ' <input name="'.$id.'_verifier" type="hidden" id="'.$id.'_verifier" value="'.$valueVer.'"/>';
    $this->elements_html .= '<label for="'.$id.'">'.$element['label'].$required.'</label><input name="'.$id.'" class="text_input '.$element_class.'" type="text" id="'.$id.'" value="'.$value.'"/>';
    $this->elements_html .= "</p>";

    Then add this code in your Quick CSS(located in Eunoia > Theme Options > Styling) or the custom.css file(located in the css folder of your theme’s folder):

    .ajax_form label {
    display: block;
    }

    or this one, if the code above doesn’t work:

    .ajax_form label {
    display: block !important;
    }

    For #2, I think unchecked values on radio or checkbox is not included in the message sent to your receiver. You can try to test your contact form using your email to check what is being sent to your receiver.

    Hope this helps. :)

    Regards,

    Ismael

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

The topic ‘Contact Form’ is closed to new replies.