[cookbook/form/dynamic_form_modification] Fix sample code

Fix sample codefor dynamic generation of submitted forms (3rd section)

| Q              | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.2+
| Fixed tickets | -