官术网_书友最值得收藏!

Forms

Unless your site has three pages and five paragraphs of text, the likelihood that you will need to capture user input via some type of form is very high. Also, if you've been coding PHP applications, you know how forms have always been a pain from the point of view of securely and efficiently rendering and processing the submitted data. As soon as you use a PHP framework such as Symfony, you will note that an API is in place to take much of that load off your shoulders.

The same goes with Drupal 8 and its powerful Form API. Historically, it has been a great abstraction over having to output your own form elements and deal with posted values. It allows you to define your own form definition in OOP and handle validation and submission in a logical way. Its render and processing is taken care of by Drupal securely, so you don't have to worry about any of that. In Drupal 8, theming form elements have become much easier than in previous versions.

In this book, we will encounter some forms and see how they actually work in practice.

主站蜘蛛池模板: 天全县| 仁寿县| 青海省| 伊宁县| 镇宁| 盐源县| 治县。| 安阳市| 白朗县| 嫩江县| 元朗区| 松潘县| 香河县| 仁化县| 彭阳县| 伊金霍洛旗| 社旗县| 涟源市| 佛冈县| 琼结县| 宝鸡市| 三江| 金秀| 班戈县| 察隅县| 思南县| 罗甸县| 丹寨县| 宜春市| 常州市| 康平县| 攀枝花市| 龙岩市| 射阳县| 通海县| 衡南县| 沁阳市| 嘉荫县| 昌黎县| 龙陵县| 青冈县|