Lately I’ve been using client-side jQuery scripts to fill in forms when users edit records in a custom CMS I’ve built. Server side script is PHP.
How to do it isn’t my issue. My question to you is opinion seeking. My clients have to have javascript turned on to use my CMS which so far hasn’t been a problem as most users don’t take issue or just don’t know how to turn it off. Using server side script like PHP takes much more code to fill things like , radio and checkbox elements. Using jQuery makes it a breeze by having my php fill an object and passing out values to the various form elements.
Thoughts on this are welcome. Thanks for reading.
Edit: seengee is right – there’s not enough information above. I’m pulling an entry from a database and populating the form so the user can make changes to existing information. The javascript is far less cumbersome programming wise. I feel like I already know the safe answer to this. I’m just looking for your thoughts. Sorry if there’s no definitive answer here—I thought it might be a fun discussion.
If it’s not necessary, and won’t make much of a difference (most users won’t experience a difference), then don’t do it. If, on the other hand, you plan on expanding your client-base in the future, and expect more people to be using this application, I would go ahead and provide it if it’s a necessary feature to your application.
When it comes to hours, money, and requirements, you ought to ask yourself if it’s necessary. If it is necessary, what priority should be attributed to it. It seems from what I’ve read that this isn’t immediately necessary, but could be in the future. As a result, I would probably start to brainstorm about how to do this efficiently – maybe begin to lookup some form-handling classes, or begin designing your own.