WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
Automatically add a character to field upon submission? (2 posts)

  1. nermal.newmail
    Member
    Posted 9 months ago #

    Hello All,

    I am planning to export my collected data to an Excel CSV (data Collected via Fast Secure Contact Form plugin, exported using a connection to Contact Form DB plugin). I have several fields in my form that collect long number/digit strings (international phone numbers, for example).

    I am beyond frustrated with Excel that it can only read number strings of 15 digits or less. Anything 16 digits or longer shows the 16+n digits as 0, which is useless when you're trying to collect an exact phone#, etc! If you format an Excel cell as text, THEN it accepts more than 15 characters/digits, so I can do this, go through each submission individually, and recopy the info into Excel. But we receive a lot of submissions and this is quite time consuming, increases the possibility of error, etc...

    So here's where I'm hoping for help in the plugin: In Excel, if you preface a digit entry with an apostrophe ( ' ), Excel reads it as text. It doesn't try to auto-format the number, and a text cell can be much longer than 15 characters. Is there a way that I can force an ' to be added to the front of a form field? I can't use a regex to force the subscriber to enter this themselves, as we are trying to keep the form simple for an audience that may have limited English and/or tech skills.

    Is there any way that I can have the plugin automatically add an apostrophe to a field submission? Subscribers/users would not see this, but it would show up in the data that is collected and sent to us, thus fooling Excel?

    I'm sorry for the confusing explanation, and I also know this is ultimately a problem in Excel, and not this plugin. But I hope the plugin might be able to help!! Ugh... If anyone knows of a way I could auto-append the apostrophe (or any character, text, etc, for the sake of learning!) to a form field submission, I will be extremely grateful. And if there's definitively not a way to do this, I would appreciate knowing that as well, so that I will stop hunting for a solution...

    Many thanks!

    http://wordpress.org/plugins/si-contact-form/

  2. Mike Challis
    Member
    Plugin Author

    Posted 9 months ago #

    Yes it can be done with a filter hook and a custom function you add to your theme functions.php file. If you have the skill to install it, I can code it. I would need a URL to your form, is it just this one form?, and tell me what field you want it applied to. This requires a $25 donation for my time. Make a support ticket and I will help you Saturday..

Reply

You must log in to post.

About this Plugin

About this Topic