Remove "Contact Info" from Enquiry Form

This topic contains 4 replies, has 2 voices, and was last updated by  oldmankit 7 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #200783

    oldmankit
    Buyer
    Post count: 116

    I would like my enquiry form to be as lean as possible and so want to hide the “Contact Info” row. I can’t hide it with css, because the row has no ID. (It’s just

    class="row  clearfix"

    .)

    Is there another way to do this?

    #200917

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    
    
    form#agt_mail_agent > .row:nth-child(3n+1) {
        display: none;
    }

    Stiofan

    #201600

    oldmankit
    Buyer
    Post count: 116

    Wow, thank you Stiofan. I had no idea that was possible!

    I don’t feel 100% safe using it though. Years down the line, an update could for some reason change the order of the rows, and it could end up hiding an essential field which completely breaks the function of this form.

    #201633

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    OK, this is a dirty little hack but it works…
    (when i say works it, it removes the field, i have not tested if the actual email is sent)

    
    
    add_action('geodir_before_inquiry_form_field', 'my_hide_phone_input_before',10,1);
    function my_hide_phone_input_before($type){
        if($type=='inq_phone'){
            ob_start();
        }
    }
    
    add_action('geodir_after_inquiry_form_field', 'my_hide_phone_input_after',10,1);
    function my_hide_phone_input_after($type){
        if($type=='inq_phone'){
            ob_end_clean();
        }
    }

    Stiofan

    #214473

    oldmankit
    Buyer
    Post count: 116

    Well, Stiofan, that totally works. Thank you so much!

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket