Sep
25
2011

I’ve never been the best at creating regex statements, so I stumbled upon this one in a forum. This regex seems to work when validating email addresses (or web site addresses) if you’re using FS Contact Form for WordPress:

/^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/

Just paste the above into the “Validation Regex” field and click “Update Options.” Here’s what mine looks like (click image for a larger version):

Validation Regex FS Contact Form WordPress

NOTE: This regex should work for any PHP-based validating that you’re doing (even if you’re not using WordPress with FS Contact Form).

UPDATE: Silly of me not to have noticed this before, but there’s already a built-in email validation option in FS Contact Form. Just select “email” from the drop-down and you’re good to go (click for a larger image):

0 Comments
Sep
21
2011

I’ve recently starting using the FS Contract Form plugin for WordPress, and I think it’s the start of a great new relationship. It did, however, take me a while to figure out how to create a drop-down menu. Here are the steps:

1) Scroll down to the “extra fields” field on the plugin’s options screen.

2) Paste the following into the “Label” field (be sure you’re not pasting it into the “Default Text” field):

Options: , Red; Green; Blue

That will create a drop-down that looks like this:

Dropdown menus in FS Contract Form for WordPress

3) Under the “fieldtype” dropdown, select the “Select” option.

4) Click “update options.” Your drop-down menu should now be active once you insert your form into a post.

Here’s what a completed drop-down menu screen should look like:

FS Contact Form Drop-down Menus

If you’re using WordPress, you’re probably savvy enough to start your own online business. Check out my post: The Top 51 Best Ways to Make Money Online and Work From Home.

0 Comments