Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #204693

    Using the contact form, I wanted to move the labels to the left.

    I looked at the choices/framework/php/class-form-generator.php file and saw that there is a parameter for the text fields called label_first, but I do not know where to set this. So for now I just commented out the if statement

    /* commented out if to always put labels first */
    			
    			//if(isset($this->form_params['label_first']))
    		//	{
    				$this->elements_html .= $label.$form_el;
    		//	}
    		//	else
    		//	{
    		//		$this->elements_html .= $form_el.$label;
    		//	}

    But for the textarea field, the label floats, so I’m wondering how to I get the label on the textarea on the right side.
    So if you can help me with using the proper label_first parameter (setting it properly) and fixing the textarea label, that would be great!

    Thanks
    Lori

    #204898

    Hi jbakken!

    You can edit the code:

    if(isset($this->form_params['label_first']))
    			{
    				$this->elements_html .= $label.$form_el;
    			}
    			else
    			{
    				$this->elements_html .= $form_el.$label;
    			}
    			
    			$this->elements_html .= "</p>";

    Replace it with:

    if(isset($this->form_params['label_first']))
    			{
    				$this->elements_html .= $label.$form_el;
    			}
    			else
    			{
    				$this->elements_html .= $label.$form_el;
    			}
    			
    			$this->elements_html .= "</p>";

    This will render the label to the left of the input fields.

    Cheers!
    Ismael

    #204905

    For the textarea, it floats on the right. How do I fix it so that on a textarea it floats either above the textarea box, or on the left of it.

    I take it the forms_param['label_first'] is not implemented yet as an option in the settings?

    #204910

    Hi!

    You can adjust it using CSS> You can add this on your custom.css or Quick CSS:

    .textare_label.hidden.textare_label_avia_message {
    position: absolute;
    left: -30px;
    }
    
    .ajax_form .text_area {
    margin-left: 80px;
    }

    Best regards,
    Ismael

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

You must be logged in to reply to this topic.