Code Snippets

Use JavaScript To Require Data To Be Entered Into A Form Field Before It Can Be Submitted

I needed a simple way to require data in a form field before it could be submitted. There are chunks of JavaScript code all of the Internet that allow you to do this easily so I selected one and added it to my form with ease. One small issue I had was it required that the name attribute be modified for it to work which caused an issue with the application I was adding it to. The issue was the name attribute was modified thus it would not save the data to the proper database table column. Below I explain how to add this bit of JavaScript to your form and modify your form for it to function properly.

Technology Insights

Remove the Website Field For Comment Posting on WordPress Using Mandingo Theme

In an attempt to promote as much community as possible I would suggest removing the Website field for when people post comments to your WordPress blog. In this scenario below the Mandingo Theme is being used however it is just as easy to remove the Website field from the default field as well. If people still want to post their web site when making a comment they can do so in the body of the comment.

If you are using the Mandingo Theme then you will need to modify two files but if using the default WordPress Theme you should only need to modify one file. The lines to remove should be the same or very similar no matter what Theme you are using.

In Mandingo follow the below directions to remove the Website field from the comments form when people are not logged in.