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

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 or Laravel, 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 rendering 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 has become much easier than in previous versions.

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

主站蜘蛛池模板: 大余县| 商洛市| 紫金县| 新野县| 乌兰县| 樟树市| 龙里县| 湘西| 江北区| 新巴尔虎右旗| 栖霞市| 密云县| 江都市| 建德市| 常州市| 五家渠市| 隆昌县| 南宫市| 缙云县| 台安县| 镇赉县| 尤溪县| 方城县| 三亚市| 卓尼县| 商南县| 水城县| 日喀则市| 宝应县| 如东县| 乐都县| 仁化县| 贵阳市| 汽车| 神木县| 抚顺市| 福鼎市| 广河县| 胶州市| 乌鲁木齐市| 黎城县|