Contact form: change URL to Company input field

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Contact form: change URL to Company input field

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #4728

    Hi again,

    You recently helped someone out who wanted to change the URL field in the contact form to a general Company field. See for the post. I copy/pasted this code, but it didn’t work. Keeps asking for valid URL. Could you please post the code again? I think this was somehow amended for the specific site. Or maybe I have to change web_URL to false and/or insert company_name class? I tried this in the .php shortcode file.



    Pls change the name from contact_url to contact_company to disable validation. If you have the child theme loaded, you need to make the change in framework/shortcodes/contact-shortcodes.php file in the child theme for changes to take effect. Here is the code that should work –

                $output .= '


    Also, I released an update yesterday which has an example of a contact form which looks exactly like the one that comes with the theme. But you will need to load the latest version of the theme for that to take effect. The advantage with contact form 7 is that you can customize it to your needs without modifications to the code and there are quite a few choices available for building a form.



    I don’t know why you think you require http:// just to have a valid URL. That’s just bad.

    Nevertheless, I’m not even sure if we have a child theme loaded, so the question is, where do I find where to edit this? You had stated

    framework/shortcodes/contact-shortcodes.php file in the child theme….however I cannot find it. Or, is there a place within the theme to find the shortcode to edit? I again couldn’t find which one had contact_url



    I found the file in wp-content/themes/agile/framework/shortcodes

    I then changed it as noted to name=”contact_company” from “contact_url”

    Same issue – so I changed it back. I cannot find the “contact form” I am reading about, which has the place to change it.

    Where is that form? Is it in the theme as it’s not on my server. thx


    If you have the child theme loaded on your site, it is definitely in the folder framework/shortcodes/contact-shortcodes.php or if you have the parent theme loaded, it is in the same location of the parent theme directory.

    If you still have trouble, pls post the FTP information and I can make the change for you. I hope you are trying to change the URL to company. Or if you want to disable the validation (which should be ok if you are not very keen on they providing a valid URL), you can search for the string


    and replace it with


    BTW, the latest version of the theme has an import file for Contact Form 7 which replicates the theme contact form in form and function. You will need to load the latest version of the theme though for it to function and look that way.


    Meteorite, sorry for this question (which may be obvious to WO pros). I am using the single page website – so the contact form is in the home page. So in this agile theme, where exactly can I find the latest Contact Form 7? And am I replacing just that form? If so, where is the new one (the updated one) to be found?



    Thx. Got the URL to not require the URL to have http://, but now this information doesn’t show up in the email I receive. Here is the code.

    $output .= ‘<fieldset>’;

    $output .= ‘<p><label>’ . __(‘Name *’, ‘mo_theme’) . ‘</label><input type=”text” name=”contact_name” placeholder=”‘ . __(“Name:”, ‘mo_theme’) . ‘” class=”text-input” required></p>’;

    $output .= ‘<p><label>’ . __(‘Email *’, ‘mo_theme’) . ‘</label><input type=”email” name=”contact_email” placeholder=”‘ . __(“Email:”, ‘mo_theme’) . ‘” class=”text-input” required></p>’;

    if (mo_to_boolean($phone))
    $output .= ‘<p><label>’ . __(‘Phone Number’, ‘mo_theme’) . ‘</label><input type=”tel” name=”contact_phone” placeholder=”‘ . __(“Phone:”, ‘mo_theme’) . ‘” class=”text-input”></p>’;

    if (mo_to_boolean($web_url))
    $output .= ‘<p><label>’ . __(‘Company’, ‘mo_theme’) . ‘</label><input type=”text” name=”contact_company” placeholder=”‘ . __(“Your Website:”, ‘mo_theme’) . ‘” class=”text-input”/></p>’;

    if (mo_to_boolean($subject))
    $output .= ‘<p class=”subject”><label>’ . __(‘Subject’, ‘mo_theme’) . ‘</label><input type=”text” name=”subject” placeholder=”‘ . __(“Subject:”, ‘mo_theme’) . ‘” class=”text-input”></p>’;

    $output .= ‘<p class=”text-area”><label>’ . __(‘Message *’, ‘mo_theme’) . ‘</label><textarea name=”message” placeholder=”‘ . __(“Message:”, ‘mo_theme’) . ‘” rows=”6″ cols=”40″></textarea></p>’;

    if (mo_to_boolean($human_check))
    $output .= ‘<p class=”human-check”><label>’ . __(‘* I am a human and 4 + 9 = ‘, ‘mo_theme’) . ‘</label><input type=”text” name=”human_check” class=”text-input” size=”5″ style=”width: 50px;”></p>’;


    There is a separate import xml file for contact form 7 bundled with the theme. I urge you to check that out since it may not be worth really modifying the code.

    The contact form 7 included looks exactly like the theme one but much more extensible, obviously.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Agile Theme Support’ is closed to new topics and replies.