WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Forms and WordPress? (7 posts)

  1. kuran
    Member
    Posted 2 years ago #

    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!

  2. bheadrick
    Member
    Posted 2 years ago #

    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.

  3. 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.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    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

  5. kuran
    Member
    Posted 2 years ago #

    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?

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    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.

  7. kuran
    Member
    Posted 2 years ago #

    I meant Custom Form Fields.

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags