Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #277320

    1) I have 2 different background color in different pages. So on dark bg I need white font color. see bottom of this page:
    http://gator3130.hostgator.com/~elites/

    Also I have white bg and I need black font color on that page. see this page:
    http://gator3130.hostgator.com/~elites/contact-us/

    I have added a quick css but it has applied to the whole site. Is there any way to make it?

    2) How can I have the contact form labels inside each cell. take a look at this page:
    http://artbees.net/themes/jupiter-demo/pages/contact-us-2/

    Is it possible with Enfold too?

    Hey I am not an expert. give me a hand!

    #277338

    Hi afarahani!

    Thank you for using the theme!

    1.) You can add this on Quick CSS or custom.css to change the label of the contact form to black:

    .avia_ajax_form label {
    color: black !important;
    }

    2.) Yes, that is possible but it will require the core modification of the theme. Edit framework > php > class-form-generator.php, we’ll try to edit the text function inside avia_form class. Look for this code on line 284:

    $form_el = ' <input name="'.$id.'" class="text_input '.$element_class.'" type="'.$type.'" id="'.$id.'" value="'.$value.'"/>';
    			$label = '<label for="'.$id.'">'.$element['label'].$required.'</label>';
    

    Replace it with:

    $form_el = ' <input placeholder="'.$element['label'].'" name="'.$id.'" class="text_input '.$element_class.'" type="'.$type.'" id="'.$id.'" value="'.$value.'"/>';
    			//$label = '<label for="'.$id.'">'.$element['label'].$required.'</label>';

    We added the place holder attribute inside the input tag then hide the actual label variable. Do the same thing with the textarea function.

    Regards,
    Ismael

    #277737

    Ismael,

    Thanks for the answer. For some reason I wasn’t able to see your reply until 5 min. ago.

    The code you gave me didn’t solve my problem! I have 3 contact forms in different part of website:
    1) on the bottom of pages with dark background. So I need white label text color : http://gator3130.hostgator.com/~elites/

    2) on the Contact Us page with white color background. So I need black label text: http://gator3130.hostgator.com/~elites/contact-us/

    3) on portfolio pages with white background color. So I need white text labels.

    That code doesnt cover all three. The text goes black or white in all pages. Please give me a solution.

    #277804

    Hi!

    You can try pre-fixing the code by the Page ID, for example:

    .page-id-12 .avia_ajax_form label {
    color: white !important;
    }

    Cheers!
    Josue

    #277831

    Thanks Josue. Problem solved.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Is it possible to have different style for the Contact Form in different pages?’ is closed to new replies.