Support » Plugin: Simple Basic Contact Form » Extra fields set-up

  • Resolved Torello

    (@torello)


    Hi there!
    Great plugin!
    I have 1 problem and 1 question.
    a) Subject field dosn’t show up.
    b) I would like to add an extra field in the form of a drop-down for subject’s general areas, such as appreciation/critique/suggestion/typo/webmaster.
    I don’t want to change the destination email (though that would be awesome as a new feature), just add a ‘select’ field (no validation necessary).
    I saw your answer here https://wordpress.org/support/topic/possible-to-add-extra-fields/ so I know it is possible, but it isn’t clear to me how to exactly proceed.
    Can you help, please?
    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi,

    Sorry for the wait, usually I respond within 24 hours on weekdays, but the 2nd part of the question required some more time to get an answer for.

    a) The plugin allows you to set your own subject message in which case the visitors can only enter the actual message, not the subject. So just remove the value from the “Default Subject” field ( WP admin > Settings > Contact Form, it’s the 5th option ) and the input will show for the visitors.

    b) That answer from 4 years ago was by the previous owner of the plugin. We recently acquired the plugin. I checked what he said back then and yes, a developer can hook into the “scf_filter_contact_form” filter and then do a search/replace with PHP to insert another field. But the field wouldn’t actually do anything, the value of that field wouldn’t be passed with the email.

    So to summarize, a web developer ( PHP/HTML knowledge required ) can add another field but the value of the field wouldn’t be part of the email sent.

    I’ve had a closer look at the code and I have an update in mind that will allow you to insert custom fields and also add them to the actual email.

    Just let me know if you’re still planning on using the plugin and I’ll get started on that update.

    Hi!
    Sorry for the late replay, did not receive the follow-up notification from wp.org.

    I most certainly do, with pleasure.
    Your willingness is much appreciated, thank you!

    Best regards

    • This reply was modified 8 months, 4 weeks ago by  Torello.
    Plugin Author WPKube

    (@wpkube)

    Hi,

    No worries. As for the extra fields, will get started on that and release an update this week.

    Plugin Author WPKube

    (@wpkube)

    Hi Torello,

    Just released the update that allows adding custom fields and have their values in the email.

    Check out the example code. It’s simple HTML + PHP. If you have any questions just let me know.

    We’ll most likely improve on this soon and make it possible to do these changes directly in the plugin settings without the need for code.

    Magic!
    I’m testing it now.
    I implemented the code, and a new ‘select’ menu correctly shows on the form.
    However, in the sent emails, only the label appears.

    I can easily wait for the plugin implementation, so no need to solve it right now.

    I have a few questions now that I’m testing the form, if you don’t mind:
    – Scope of ‘Click here to reset the form’ link on Success page?
    – Difference btw Ip and Host ip? They show both as my wan ip in the emails sent.
    – I know the form is well coded and already ‘Protects against bad bots, malicious input, and other threats’. Can I just disable the captcha, or it would be wise to also add a honeypot (so as to avoid spam but also the captcha-like thing)?

    I also have a few minor suggestions I won’t bother you with right now.
    Kudos for the skills and mindset (and time!) you pour into your plugins (and website!) for the sake of us less-gifted 😉
    Great job, thank you!

    • This reply was modified 8 months, 2 weeks ago by  Torello.
    Plugin Author WPKube

    (@wpkube)

    Make sure in scf_get_field_value it’s the same as the name attribute on the select field. It’s the only thing that comes to mind.

    Or send over the code you have and I’ll check it out.

    1) Not 100% sure what you meant by scope of the reset link.

    2) Host IP returns REMOTE_ADDR and IP uses different values to get the IP address of the visitor, but when it fails to get the information for HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP it defaults to REMOTE_ADDR which is when you would see the same values for those fields. But to be honest, I’m not quite sure why the previous plugin owner added that information in the emails.

    3) The “Captcha” is what stops the spam, removing it would let spambots go through the form. Honeypot approach would work, but would be best in combination with non descriptive name attributes for the actual fields, so instead of “scf_name” it would be like “scf_1” and there could be a field called “scf_name” which visitors wouldn’t see but a spambot would and think that’s where the name goes, so it fills the field and we catch it. Definitely something I’ll be looking into.

    You’re welcome and thank you 🙂

    Very encouraging to see fast response and active development for this plugin – I’ll second the request for extra fields setup!….as long as it’s simple 😉

    I’ve a few other questions/comments but will make them in a separate thread as they’re not specifically extra fields related!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Extra fields set-up’ is closed to new replies.