How to edit the contact us form that only uses a shortcode

Solved11 replies3 participantsUpdated by Eva Kemp

  • Avatar: americanpatriot
    americanpatriot
    Participant

    This is probably a silly question but I’m going to ask it any way. How can I edit the demo contact us form? It just uses a shortcode and I can’t find anything anywhere that allows me to change the form itself. Do I have to edit a core file? I”m soooooo confused! 🙂

    Thanks,

    AP

    11 Answers

    Avatar: Robert Hall
    Robert Hall
    Participant

    Hello,

    You can edit file /themes/royal/framework/theme-functions.php (line 1285).
    But we don’t recommended to do that.
    Before editing be sure to make a backup this file and do that in Child Theme.
    Read more here how to create Child Theme and use it:
    http://codex.wordpress.org/Child_Themes

    Also you can use some third-party plugin to implement such functionality.

    Regards,
    Robert Hall.

    Avatar: americanpatriot
    americanpatriot
    Participant

    Thanks but I couldn’t find what I wanted to change in the theme-functions.php file. I want to remove the word “Surname” and leave just “Name” on the form. How do I do that?

    Thanks,

    AP

    Avatar: americanpatriot
    americanpatriot
    Participant

    UPDATE: I did find the “surname” in /themes/royal/framework/shortcodes.php. I made a new file called shortcodes.php and copied the contents of the original file to that file. I removed the “surname” and placed the new file in /themes/royalchild/framework/shortcodes.php but it didn’t change on the front-end. Am I missing something?

    Thanks,

    AP

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    Please provide us with FTP and wp-admin panel credentials in Private Content.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: americanpatriot
    americanpatriot
    Participant

    Requested information is in private content.

    Thanks,

    AP

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    We’re unable to access your site. There is an error “Server not found”.
    Concerning the contact form you needn’t copy the whole file shortcodes.php. You should use functions.php of the child theme and rewrite just the function and code you want to change. Please read this article carefully: http://codex.wordpress.org/Child_Themes

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: americanpatriot
    americanpatriot
    Participant

    Yes, I scrapped the site and started over. If I have issues I’ll post another question and use the new login information.

    I’ll look into rewriting the code and adding it to the functions.php in my child theme.

    Thank you!

    AP

    Avatar: americanpatriot
    americanpatriot
    Participant

    I copied the entire Contact Form section found in the shortcodes.php file, pasted it in my child theme’s functions.php file, made the changes I wanted, and it worked. Thank you!

    Do I need that entire section or can I pare it down to something smaller and still get the same result?

    Thanks,

    AP

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    You can try using just this code:
    `<div class=”form-group”>
    <p class=”form-name”>
    <label for=”name” class=”control-label”><?php _e(‘Name and Surname’, ETHEME_DOMAIN) ?> <span class=”required”>*</span></label>
    <input type=”text” name=”contact-name” class=”required-field form-control” id=”contact-name”>
    </p>
    </div>`

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: americanpatriot
    americanpatriot
    Participant

    That didn’t work. It gave me a Parse Error. I just left all of it in since it’s working. I’m not sure if it’s the best way to do it but hey, it works.

    Thank you!

    AP

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    You’re welcome.

    Regards,
    Eva Kemp.

The issue related to '‘How to edit the contact us form that only uses a shortcode’' has been successfully resolved, and the topic is now closed for further responses