Wordpress 3.0 jQuery phần 6

Sau đó, trong bảng điều khiển chính quyền cforms cho form đăng ký của tôi, bây giờ chúng ta có thể thêm {Event} biến đến lĩnh vực tổ chức sự kiện mà tôi đã thêm vào trang trong plugin. Chúng ta hãy cũng làm cho chắc chắn rằng lĩnh vực này là thiết lập để "chỉ đọc". | Simpo PDF Merge and Split Unregistered Version - http 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 evnt 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 Simpo PDF Merge and Split Unregistered Version - http 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 cformsII 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 Simpo PDF Merge and Split Unregistered Version - http 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 .

TỪ KHÓA LIÊN QUAN