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

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.

主站蜘蛛池模板: 永顺县| 开平市| 鲁山县| 拜泉县| 温州市| 甘肃省| 北票市| 抚顺县| 新巴尔虎右旗| 旌德县| 岚皋县| 自贡市| 兴宁市| 洛川县| 抚松县| 赣州市| 大方县| 黔南| 临夏县| 平凉市| 六盘水市| 盐亭县| 新密市| 铜山县| 宽甸| 墨玉县| 资溪县| 双辽市| 边坝县| 阳西县| 沛县| 皮山县| 通许县| 灵台县| 金乡县| 岳池县| 彭泽县| 南岸区| 仪征市| 边坝县| 平阴县|