Problem/Motivation
Even though, #markup renders without any problem. There is no way to manage this markup
Proposed resolution
Creating a #markup render element will allow the YAML form module to control the display and rendering of all markup. This would allow HTML to be convert to plain text for emails.
Remaining tasks
- Create YamlFormMarkup render element.
- Create YamlFormMarkup element handler
- Convert HTML to plain text
- Add element['#display_on'] [form, submission, both]
- Allow markup to be included in submission and/or email.
- Update examples
- Write test
Development Notes
- Branch Name: 2721587-markup-element
- Patch Name: yamlform-markup-element-2721587-XX.patch
- Commit message: Issue #2721587: Add markup element.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | yamlform-markup-element-2721587-04.patch | 10.84 KB | jrockowitz |
Comments
Comment #2
jrockowitz commentedComment #4
jrockowitz commentedComment #6
jrockowitz commentedComment #7
NetNerdy commenteddrupal 8.1.1 , yamlform dev (from 2016-05-09) after the patch above #4:
i have added the element -> '#display_on': '[submission]'
...without any result.
?!
Comment #8
jrockowitz commentedI just implemented this feature a few hours ago.
There is an example in /form/example-inputs-extras and below is the code snippet.
Moving forward, I will start updating my tickets with better examples and URLs.
Comment #9
NetNerdy commentedok...i have installed by drush: yamlform alpha-9 + patch #4, drupal 8.1.1, php 7
i'm understanding the "markup type"...now. i can use html/text direkt in the form...very nice feature!
i can't using tokens in this way like [current-page:title]...right?! so i have to have some fields (e.g. 'textfield') for token support.