WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Forms and WordPress?

[Resolved] Forms and WordPress?

  • I need to make several contact forms for my WP site, but I do not want to resort to plugins for this, as this seems ‘messy’ and inefficient.
    I also want full control over the styling of the form.

    Where should I look? Is it a question of adding the right PHP code to my functions.php? I also assume I can’t put the PHP data in the html section of a WP ‘page’.. do I need to make a static .php page and call on that in WP?

    Disclaimer:
    I have tried to google this subject, but haven’t really found a clear answer (many old articles, or WP plugin suggestions..) Apologies if this thread is redundant.

    Thanks for any help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • bheadrick
    Participant

    @bheadrick

    By default, you cannot call php from the post, but there is a phpexec plugin which will allow you to call PHP code from within your post. That sounds a lot more inefficient than just installing something like contact forms 7 and editing the css so that it looks the way you want it to look if you’re doing multiple forms – unless you don’t want them to look consistent.

    Plugins are often far less messy and inefficient than trying to code it yourself 🙂 Look at Grunion for an example of how small and simple it can be.

    The phpexec plugin seems to fail for a lot of people. Especially when it comes to setting up forms.

    Best bet if you loathe plugins, is to make custom templates with your forms.

    However, I’m with @ipstenu, a plugin for this is probably easier and less messy than coding multiple templates.

    You can go as big or small as you want with a forms plugin. Tonnes of features, or just barebones.

    I use Contact Form 7 for a lighter weight plugin

    http://vudu.me/4o
    Is an example of how I get precise control over what the plugin outputs and displays like

    Thanks for the help and tips.

    I tried Grunion, and besides working effortlessly, it doesn’t seem like I can add new fields to it.

    Contact Form 7 seems to be more fully featured with its own Settings page, although I haven’t looked at it long enough to see if I can add custom fields. Does anyone here know?

    do you mean custom fields, the WordPress term, or custom form fields?

    I have a variety of custom form fields on my CF7 form. Checkboxes, text fields, etc.

    I meant Custom Form Fields.

    Good to know, that means CF7 is the one to go with. Thank you everyone!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Forms and WordPress?’ is closed to new replies.