Tham khảo tài liệu 'wordpress jquery - part 17', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Doing a Lot More with Less Making Use of Plugins for Both jQuery and WordPress Then in the cforms administration panel for my Registration form we can now add the Event variable to the Event field that I added to the page in the plugin. Let s also make sure the field is set to read only . Just for clarity I d like the event name to show up in the header of the form as well. The header is not part of cforms but part of the page template. In my theme directory I ll open up registration-page . php and next to the header s the_title template tag on line 41 I ll add the following code h2 php the_title for php evnt esc_attr _GET evnt1 echo evnt h2 When the form launches you ll now see the name of the event in the header and in the Event field which is set to read only and not editable by the user. Now when the form is submitted and e-mailed to the administrator it s clear what event the registration is for. 146 Chapter 4 We now have an Event page that shows the user s upcoming events and lets them seamlessly register for those in a form that loads in a modal window as planned. Great job Let s see about making this experience even better. Part 2 Form validation make sure that what s submitted is right The great news is cformsll provides nifty awesomely CSS styled server-side validation already built-in and ready to go. You can see if I click on Submit on my form without filling out the required details or an improperly formatted e-mail address the form reloads showing me the fields that are incorrect. 147 Doing a Lot More with Less Making Use of Plugins for Both jQuery and WordPress But why wait until the user clicks on the Submit button While server-side validation is essential and the only way to properly validate data by adding in a little client-side validation with jQuery we can easily enhance and speed up the user s process by alerting them as they work through the form that they re missing details or have data improperly formatted. Why is server-side .