Webform module and config export

This commit is contained in:
Rob Davies 2017-03-16 15:29:07 +00:00
parent 3e6a5cbed2
commit 0e15467384
1040 changed files with 117682 additions and 0 deletions

View file

@ -0,0 +1,105 @@
Development Cheatsheet
----------------------
### GitFlow
```bash
# Create branch
git checkout 8.x-5.x
git checkout -b [issue-number]-[issue-description]
git push -u origin [issue-number]-[issue-description]
# Create patch
git diff 8.x-5.x > [project_name]-[issue-description]-[issue-number]-00.patch
# Create interdiff
interdiff \
[issue-number]-[old-comment-number].patch \
[issue-number]-[new-comment-number].patch \
> interdiff-[issue-number]-[old-comment-number]-[new-comment-number].txt
# Merge branch with all commits
git checkout 8.x-5.x
git merge [issue-number]-[issue-description]
git push
# Merge branch as a single new commit
git checkout 8.x-5.x
git merge --squash [issue-number]-[issue-description]
git commit -m 'Issue #[issue-number]: [issue-description]'
git push
# Delete branch
git branch -D [issue-number]-[issue-description]
git push origin :[issue-number]-[issue-description]
```
**Import and Export Configuration**
```bash
# Generate *.features.yml for the webform.module and sub-modules.
# These files will be ignored. @see .gitignore.
echo 'true' > webform.features.yml
echo 'true' > modules/webform_examples/webform_examples.features.yml
echo 'true' > modules/webform_templates/webform_templates.features.yml
echo 'true' > modules/webform_node/webform_node.features.yml
# Make sure all modules that are going to be exported are enabled
drush en -y webform\
webform_demo_application_evaluation\
webform_examples\
webform_templates\
webform_test\
webform_test_element\
webform_test_handler\
webform_test_options\
webform_test_views\
webform_test_translation\
webform_node;
# Show the difference between the active config and the default config.
drush features-diff webform
drush features-diff webform_test
# Export webform configuration from your site.
drush features-export -y webform
drush features-export -y webform_demo_application_evaluation
drush features-export -y webform_examples
drush features-export -y webform_templates
drush features-export -y webform_test
drush features-export -y webform_test_element
drush features-export -y webform_test_handler
drush features-export -y webform_test_options
drush features-export -y webform_test_views
drush features-export -y webform_test_translation
drush features-export -y webform_node
# Revert all feature update to *.info.yml files.
git checkout -- *.info.yml
# Tidy webform configuration from your site.
drush webform-tidy -y --dependencies webform
drush webform-tidy -y --dependencies webform_demo_application_evaluation
drush webform-tidy -y --dependencies webform_examples
drush webform-tidy -y --dependencies webform_templates
drush webform-tidy -y --dependencies webform_test
drush webform-tidy -y --dependencies webform_test_element
drush webform-tidy -y --dependencies webform_test_handler
drush webform-tidy -y --dependencies webform_test_options
drush webform-tidy -y --dependencies webform_test_views
drush webform-tidy -y --dependencies webform_test_translation
drush webform-tidy -y --dependencies webform_node
# Re-import all webform configuration into your site.
drush features-import -y webform
drush features-import -y webform_demo_application_evaluation
drush features-import -y webform_examples
drush features-import -y webform_templates
drush features-import -y webform_test
drush features-import -y webform_test_element
drush features-import -y webform_test_handler
drush features-import -y webform_test_options
drush features-import -y webform_test_views
drush features-import -y webform_test_translation
drush features-import -y webform_node
```

View file

@ -0,0 +1,246 @@
Development Notes
-----------------
Below are useful commands that make it a little easier for
me to maintain the Webform module.
### Patching
**[Create and manage patches](https://www.drupal.org/node/707484)**
```bash
# Create and checkout issue branch
git checkout -b [issue-number]-[issue-description]
# Push issue branch to D.O. (optional)
git push -u origin [issue-number]-[issue-description]
# Create patch by comparing (current) issue branch with 8.x-5.x branch
git diff 8.x-5.x > [project_name]-[issue-description]-[issue-number]-[comment-number]-[drupal-version].patch
```
**Ignoring *.patch, *.diff, and .gitignore files**
```bash
cat >> .gitignore <<'EOF'
.gitignore
*.patch
*.diff
EOF
```
**[Apply patch](https://www.drupal.org/node/1399218)**
```bash
curl https://www.drupal.org/files/[patch-name].patch | git apply -
```
**[Revert patch](https://www.drupal.org/patch/reverse)**
```bash
curl https://www.drupal.org/files/[patch-name].patch | git apply -R -
```
### Branching
**Merge branch**
```bash
# Merge branch with all commits
git checkout 8.x-5.x
git merge [issue-number]-[issue-description]
git push
# Merge branch as a single new commit
git checkout 8.x-5.x
git merge --squash [issue-number]-[issue-description]
git commit -m 'Issue #[issue-number]: [issue-description]'
git push
```
**Exporting a branch**
```bash
# Create a zip archive for a branch
git archive --format zip --output webform-[issue-number]-[issue-description].zip [issue-number]-[issue-description]
```
**Delete issue branch**
```bash
# Delete local issue branch.
git branch -d [issue-number]-[issue-description]
# Delete remote issue branch.
git push origin :[issue-number]-[issue-description]
```
### [Interdiff](https://www.drupal.org/documentation/git/interdiff)
```bash
interdiff \
[issue-number]-[old-comment-number].patch \
[issue-number]-[new-comment-number].patch \
> interdiff-[issue-number]-[old-comment-number]-[new-comment-number].txt
```
### Drush
**Reinstall Webform module.**
```bash
drush php-eval 'module_load_include('install', 'webform'); webform_uninstall();'; drush cron;
drush php-eval 'module_load_include('install', 'webform_node'); webform_node_uninstall();'; drush cron;
drush webform-purge --all -y; drush pmu -y webform_test; drush pmu -y webform_devel; drush pmu -y webform_examples; drush pmu -y webform_templates; drush pmu -y webform_ui; drush pmu -y webform_node; drush pmu -y webform;
drush en -y webform webform_ui webform_devel webform_examples webform_templates webform_node;
# Optional.
drush en -y webform_test;
drush en -y webform_test_third_party_settings;
drush en -y webform_test_translation;
drush pmu -y webform_test_third_party_settings webform_test_translation;
```
**Reinstall Webform Test module.**
```bash
drush webform-purge --all -y; drush pmu -y webform_test; drush en -y webform_test;
```
**Install extra modules.**
```bash
drush en -y webform captcha image_captcha honeypot validators;
```
**Create test roles and users.**
```bash
drush role-create developer
drush role-add-perm developer 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,administer webform,edit webform assets,administer blocks,administer nodes'
drush user-create developer --password="developer"
drush user-add-role developer developer
drush role-create admin
drush role-add-perm admin 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,administer webform submission'
drush user-create admin --password="admin"
drush user-add-role admin admin
drush role-create manager
drush role-add-perm manager 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview'
drush user-create manager --password="manager"
drush user-add-role manager manager
drush role-create viewer
drush role-add-perm viewer 'view the administration theme,access toolbar,access administration pages,access content overview,access webform overview,view any webform submission'
drush user-create viewer --password="viewer"
drush user-add-role viewer viewer
drush role-create user
drush user-create user --password="user"
drush user-add-role user user
drush role-create any
drush user-create any --password="any"
drush role-add-perm any 'view the administration theme,access administration pages,access toolbar,access webform overview,edit webform assets,create webform,edit any webform,delete any webform,view webform submissions any node,edit webform submissions any node,delete webform submissions any node'
drush user-add-role any any
drush role-create own
drush user-create own --password="own"
drush role-add-perm own 'view the administration theme,access administration pages,access toolbar,access webform overview,edit webform assets,create webform,edit own webform,delete own webform,view webform submissions own node,edit webform submissions own node,delete webform submissions own node'
drush user-add-role own own
```
**Create test submissions for 'Contact' and 'Example: Elements' webform.**
```bash
drush webform-generate contact
drush webform-generate example_elements
```
**Test update hooks**
```bash
drush php-eval 'module_load_include('install', 'webform'); ($message = webform_update_8001()) ? drupal_set_message($message) : NULL;'
```
**Access developer information**
```bash
drush role-add-perm anonymous 'access devel information'
drush role-add-perm authenticated 'access devel information'
```
**Reinstall**
```bash
drush -y site-install\
--account-mail="example@example.com"\
--account-name="webmaster"\
--account-pass="drupal.admin"\
--site-mail="example@example.com"\
--site-name="Drupal 8 (Webform)";
# Enable core modules
drush -y pm-enable\
book\
simpletest\
telephone\
language\
locale\
content_translation\
config_translation;
# Disable core modules
drush -y pm-uninstall\
update;
# Enable contrib modules
drush -y pm-enable\
devel\
devel_generate\
kint\
webprofiler\
webform\
webform_devel\
webform_examples\
webform_node\
webform_templates\
webform_test\
webform_test_translation;
```
### How to take a screencast
**Setup**
- Drupal
- Install Drupal locally.
- Remove all blocks in first sidebar.
http://localhost/d8_dev/admin/structure/block
- Desktop
- Switch to laptop.
- Turn 'Hiding on' in the Dock System Preferences.
- Set screen display to 'Large Text'
- Chrome
- Hide Bookmarks.
- Hide Extra Icons.
- Always Show Toolbar in Full Screen.
- Delete all webform.* keys from local storage.
**Generate list of screencasts**
```php
$help = _webform_help();
print '<pre>';
foreach ($help as $name => $info) {
print "webform-" . $name . PHP_EOL;
print 'Webform Help: ' . $info['title'] . PHP_EOL;
print PHP_EOL;
}
print '</pre>'; exit;
```
**Uploading**
- Title : Webform Help: {title} [v01]
- Tags: Drupal 8,Webform,Form Builder
- Privacy: Unlisted

View file

@ -0,0 +1,392 @@
Features
--------
## Form Builder
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-builder.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-builder.png" alt="Form Builder" />
</a>
</div>
The Webform module provides an intuitive webform builder based upon Drupal 8's
best practices for user interface and user experience. The webform builder allows non-technical users to easily build and maintain webforms.
Form builder features include:
- Drag-n-drop webform element management
- Generation of test submissions
- Duplication of existing webforms, templates, and elements
## Form Settings
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-settings.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-settings-thumbnail.png" alt="Form Settings" />
</a>
</div>
Form submission handling, messaging, and confirmations are completely
customizable using global settings and/or form-specific settings.
Form settings that can be customized include:
- Messages and button labels
- Confirmation page, messages, and redirects
- Saving drafts
- Previewing submissions
- Confidential submissions
- Prepopulating a webform's elements using query string parameters
- Preventing duplicate submissions
- Disabling back button
- Warning users about unsaved changes
- Disabling client-side validation
- Limiting number of submission per user, per webform, and/or per node
- Look-n-feel of webform, confirmation page, and buttons
- Injection webform specific CSS and JavaScript
## Elements
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-elements.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-elements-thumbnail.png" alt="Elements" />
</a>
</div>
The Webform module is built directly on top of Drupal 8's Form API. Every
[form element](https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/8)
available in Drupal 8 is supported by the Webform module.
Form elements include:
- **HTML:** Textfield, Textareas, Checkboxes, Radios, Select menu,
Password, and more...
- **HTML5:** Email, Url, Number, Telephone, Date, Number, Range,
and more...
- **Drupal specific** File uploads, Entity References, Table select, Date list,
and more...
- **Custom:** [Likert scale](https://en.wikipedia.org/wiki/Likert_scale),
Star rating, Toggle, Buttons, Credit card number, Geolocation,
Select/Checkboxes/Radios with other, and more...
- **Markups** Inline dismissable messages, HTML Markup, Details, and Fieldsets.
- **Composite elements:** Name, Address, Contact, and Credit Card
## Element Settings
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-element-settings.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-element-settings-thumbnail.png" alt="Element Settings" />
</a>
</div>
All of Drupal 8's default webform element properties and behaviors are supported.
There are also several custom webform element properties and settings
available to enhance a webform element's behavior.
Standard and custom properties allow for:
- **Customizable required error messages**
- **Conditional logic** using [FAPI States API](https://api.drupal.org/api/examples/form_example%21form_example_states.inc/function/form_example_states_form/7)
- **Input masks** (using [jquery.inputmask](https://github.com/RobinHerbots/jquery.inputmask))
- **[Select2](https://select2.github.io/)** replacement of select boxes
- **Word and character counting** for text elements
- **Help popup** (using [jQuery UI Tooltip](https://jqueryui.com/tooltip/))
- **Regular expression pattern validation**
- **Private** elements, visible only to administrators
- **Unique** values per element
## Viewing Source
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-source.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-source-thumbnail.png" alt="Viewing Source" />
</a>
</div>
At the heart of a Webform module's webform elements is a Drupal render array,
which can be edited and managed by developers. The Drupal render array gives developers
complete control over a webform's elements, layout, and look-and-feel by
allowing developers to make bulk updates to a webform's label, descriptions, and
behaviors.
## States/Conditional Logic
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-states.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-states.png" alt="States/Conditional Logic" />
</a>
</div>
Drupal's State API can be used by developers to provide conditional logic to
hide and show webform elements.
Drupal's State API supports:
- Show/Hide
- Open/Close
- Enable/Disable
## Multistep Forms
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-wizard.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-wizard.png" alt="Multistep Forms" />
</a>
</div>
Forms can be broken up into multiple pages using a progress bar. Authenticated
users can save drafts and/or have their changes automatically saved as they
progress through a long webform.
Multistep webform features include:
- Customizable progress bar
- Customizable previous and next button labels and styles
- Saving drafts between steps
## Email & Remote Post Handlers
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-handlers.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-handlers-thumbnail.png" alt="Email/Handlers" />
</a>
</div>
Upon webform submission, customizable email notifications and confirmations can
be sent to users and administrators.
An extendable plugin that allows developers to push submitted data
to external or internal systems and/or applications is provided.
Email support features include:
- Previewing and resending emails
- Sending HTML emails
- File attachments (requires the [Mail System](https://www.drupal.org/project/mailsystem) and [Swift Mailer](https://www.drupal.org/project/swiftmailer) module.)
- HTML and plain-text email-friendly Twig templates
- Customizable display formats for individual webform elements
Remote post features include:
- Posting selected elements to remote server
- Adding custom parameters to remote post requests
## Results Management
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-results.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-results-thumbnail.png" alt="Results Management" />
</a>
</div>
Form submissions can optionally be stored in the database, reviewed, and
downloaded.
Submissions can also be flagged with administrative notes.
Results management features include:
- Flagging
- Administrative notes
- Viewing submissions as HTML, plain text, and YAML
- Customizable reports
- Downloading results as a CSV to Google Sheets or MS Excel
- Saving of download preferences per form
- Automatically purging old submissions based on certain criteria
## Access Controls
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-access.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-access-thumbnail.png" alt="Access Controls" />
</a>
</div>
The Webform module provides full access controls for managing who can create
forms, post submissions, and access a webform's results.
Access controls can be applied to roles and/or specific users.
Access controls allow users to:
- Create new forms
- Update forms
- Delete forms
- View submissions
- Update submissions
- Delete submissions
- View selected elements
- Update selected elements
## Reusable Templates
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-templates.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-templates-thumbnail.png" alt="Reusable Templates" />
</a>
</div>
The Webform module provides a few starter templates and multiple example forms
which webform administrators can update or use to create new reusable templates
for their organization.
Starter templates include:
- Contact Us
- Donation
- Employee Evaluation
- Issue
- Job Application
- Job Seeker Profile
- Registration
- Session Evaluation
- Subscribe
- User Profile
Example webforms include:
- Elements
- Basic layout
- Flexbox layout
- Input masks
- Options
- Wizard
## Reusable Options
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-options.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-options-thumbnail.png" alt="Reusable Options" />
</a>
</div>
Administrators can define reusable global options for select menus, checkboxes,
and radio buttons. The Webform module includes default options for states,
countries, [likert](https://en.wikipedia.org/wiki/Likert_scale) answers,
and more.
Reusable options include:
- Country codes & names
- Credit card codes
- Days, Months, Time zones
- Education, Employment status, Ethnicity, Industry, Languages, Marital status, Relationship, Size, and Titles
- Likert agreement, comparison, importance, quality, satisfaction, ten scale, and
would you
- State/province codes & names
- State codes & names
## Internationalization
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-internalization.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-internalization-thumbnail.png" alt="Internationalization" />
</a>
</div>
Forms and configuration can be translated into multiple languages using Drupal's
configuration translation system.
## Drupal Integration
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-integration.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-integration-thumbnail.png" alt="Drupal Integration" />
</a>
</div>
Forms can be attached to nodes or displayed as blocks. Webforms can also have
dedicated SEO-friendly URLs. Webform elements are simply render arrays that can
easily be altered using custom hooks and/or plugins.
## Add-ons & Third Party Settings
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-add-ons.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-add-ons-thumbnail.png" alt="Add-ons & Third Party Settings" />
</a>
</div>
Includes a list of modules and projects that extend and/or provide additional
functionality to the Webform module and Drupal's Form API.
## Extendable Plugins
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-plugin.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-plugin.png" alt="Extendable Plugins" />
</a>
</div>
The Webform module provides [plugins](https://www.drupal.org/developing/api/8/plugins)
and hooks that allow contrib and custom modules to extend and enhance webform
elements and submission handling.
**WebformElement plugin** is used to integrate and enhance webform elements so
that they can be properly integrated into the Webform module.
**WebformHandler plugin** allows developers to extend a webform's submission
handling.
**WebformExporter plugin** allows developers to export results using custom
formats and file types.
## Help & Video Tutorials
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-help.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-help-thumbnail.png" alt="Help & Video Tutorials" />
</a>
</div>
The Webform module provides examples, inline help, and screencast walk throughs.
Screencasts include:
- [Welcome to the Webform module](https://youtu.be/sQGsfQ_LZJ4)
- [Installing the Webform module and third party libraries](https://youtu.be/IMfFTrsjg5k)
- [Managing Webforms, Templates, and Examples](https://youtu.be/T5MVGa_3jOQ)
- [Adding Elements, Composites, and Containers](https://youtu.be/LspF9mAvRcY)
- [Configuring Webform Settings and Behaviors](https://youtu.be/UJ0y09ZS9Uc)
- [Controlling Access to Webforms and Elements](https://youtu.be/SFm76DAVjbE)
- [Collecting Submissions, Sending Emails, and Posting Results](https://youtu.be/OdfVm5LMH9A)
- [Placing Webforms in Blocks and Creating Webform Nodes](https://youtu.be/xYBW2g0osd4)
- [Administering and Extending the Webform module](https://youtu.be/bkScAX_Qbt4)
- [Using the Source](https://youtu.be/2pWkJiYeR6E)
- [Getting Help](https://youtu.be/sRXUR2c2brA)
## Drush Integration
<div class="thumbnail">
<a href="https://www.drupal.org/files/webform-8.x-5.x-drush.png">
<img src="https://www.drupal.org/files/webform-8.x-5.x-drush.png" alt="Drush Integration" />
</a>
</div>
Drush commands are provided to:
- Generate multiple webform submissions
- Export webform submissions
- Purge webform submissions
- Download and manage third party libraries
- Tidy YAML configuration files
--------------------------------------------------------------------------------
_This file was generated from [FEATURES.md](http://cgit.drupalcode.org/webform/tree/FEATURES.md?h=8.x-5.x)._

View file

@ -0,0 +1,125 @@
Known Issues
------------
Below are known Drupal 8 core issues that are affecting the Webform module.
### Configuration Management
**[Issue #2808287: Importing Webform config file via the UI is throwing serialization error](https://www.drupal.org/node/2808287)**
> Importing configuration files using Drush is working fine.
**[Issue #1920902: Unable to tidy the bulk export of Webform and WebformOptions config files
because Drupal's YAML utility is not a service.](https://www.drupal.org/node/1920902)**
> The Webform module provides drush commands to 'tidy' exported YAML and
> configuration files that so they are easier to read and edit.
### Form Elements
**[Drupal core webforms system issues](https://www.drupal.org/project/issues/drupal?status=Open&version=8.x&component=forms+system)**
> Any changes, improvements, and bug fixes for Drupal's Form API may directly
> impact the Webform module.
- [Issue #1593964: Allow FAPI usage of the datalist element](https://www.drupal.org/node/1593964)
**[Issue #2502195: Regression: Webform throws LogicException when trying to render a webform with object as an element's default value.](https://www.drupal.org/node/2502195)**
> Impacts previewing entity autocomplete elements.
**[Issue #2207383: Create a tooltip component](https://www.drupal.org/node/2207383)**
> Impacts displaying element description in a tooltip. jQuery UI's tooltip's UX
> is not great.
**[Issue #2741877: Nested modals don't work: when using CKEditor in a modal, then clicking the image button opens another modal, which closes the original modal](https://www.drupal.org/node/2741877)**
> Makes it impossible to display the CKEditor in a dialog.
> Workaround: Use custom download of CKEditor which include a CKEditor specific
> link dialog.
### \#states API (Conditionals)
#### Button (button & submit)
**[Issue #1671190 by Lucasljj, idebr, Cameron Tod: Use <button /> webform element type instead of <input type="submit" />](https://www.drupal.org/node/1671190)**
#### Date/time (datetime)
**[Issue #2419131: #states attribute does not work on #type datetime](https://www.drupal.org/node/2419131)**
#### Details (details)
**[Issue #2348851: Regression: Allow HTML tags inside detail summary](https://www.drupal.org/node/2348851)**
#### Item (item)
**[Issue #783438: #states doesn't work for #type item](https://www.drupal.org/node/783438)**
#### HTML markup (markup)
**[Issue #2700667: Notice: Undefined index: #type in drupal_process_states()](https://www.drupal.org/node/2700667)**
#### Managed file (managed_file)
**[Issue #2705471: Webform states managed file fields](https://www.drupal.org/node/2705471)**
#### Password confirm (password_confirm)
**[Issue #1427838: password and password_confirm children do not pick up #states or #attributes](https://www.drupal.org/node/1427838)**
#### Select (select)
**[Issue #1426646: "-Select-" option is lost when webform elements uses '#states'](https://www.drupal.org/node/1426646)**
**[Issue #1149078: States API doesn't work with multiple select fields](https://www.drupal.org/node/1149078)**
**[Issue #2791741: FAPI states: fields aren't hidden initially when depending on multi-value selection](https://www.drupal.org/node/2791741)**
#### Radios (radios)
**[Issue #2731991: Setting required on radios marks all options required](https://www.drupal.org/node/2731991)**
**[Issue #994360: #states cannot disable/enable radios and checkboxes](https://www.drupal.org/node/994360)**
#### Text format (text_format)
**[Issue #997826: #states doesn't work correctly with type text_format](https://www.drupal.org/node/997826)**
**[Issue #2625128: Text format selection stays visible when using editor and a hidden webform state](https://www.drupal.org/node/2625128)**
### Submission Display
**[Issue #2484693: Telephone Link field formatter breaks Drupal with 5 digits or less in the number](https://www.drupal.org/node/2720923)**
> Workaround is to manually build a static HTML link.
> See: \Drupal\webform\Plugin\WebformElement\Telephone::formatHtml
### Access Control
**[Issue #2636066: Access control is not applied to config entity queries](https://www.drupal.org/node/2636066)**
> Workaround: Manually check webform access.
> See: Drupal\webform\WebformEntityListBuilder
### User Interface
**[Issue #2235581: Make Token Dialog support inserting in WYSIWYGs (TinyMCE, CKEditor, etc.)](https://www.drupal.org/node/2235581)**
> This blocks tokens from being inserted easily into the CodeMirror widget.
> Workaround: Disable '\#click_insert' functionality from the token dialog.
**Config entity does NOT support [Entity Validation API](https://www.drupal.org/node/2015613)**
> Validation constraints are only applicable to content entities and fields.
>
> In D8 all config entity validation is handled via
\Drupal\Core\Form\FormInterface::validateForm
>
> Workaround: Created the WebformEntityElementsValidator service.
**[Issue #2585169: Unable to alter local actions prior to rendering](https://www.drupal.org/node/2585169)**
> Makes it impossible to open an action in a dialog.
> Workaround: Add local action to a controller's response.

View file

@ -0,0 +1,109 @@
Steps for creating a new release
--------------------------------
1. Cleanup code
2. Export configuration
3. Review code
4. Run tests
5. Generate release notes
6. Tag and create a new release
7. Upload screencast to YouTube
1. Cleanup code
---------------
[Convert to short array syntax](https://www.drupal.org/project/short_array_syntax)
drush short-array-syntax webform
Tidy YAML files
@see DEVELOPMENT-CHEATSHEET.md
2. Export configuration
-----------------------
@see DEVELOPMENT-CHEATSHEET.md
3. Review code
--------------
[Online](http://pareview.sh)
http://git.drupal.org/project/webform.git 8.x-5.x
[Commandline](https://www.drupal.org/node/1587138)
# Check Drupal coding standards
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info modules/sandbox/webform
# Check Drupal best practices
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info modules/sandbox/webform
[File Permissions](https://www.drupal.org/comment/reply/2690335#comment-form)
# Files should be 644 or -rw-r--r--
find * -type d -print0 | xargs -0 chmod 0755
# Directories should be 755 or drwxr-xr-x
find . -type f -print0 | xargs -0 chmod 0644
4. Run tests
------------
[SimpleTest](https://www.drupal.org/node/645286)
# Run all tests
php core/scripts/run-tests.sh --url http://localhost/d8_dev --module webform
[PHPUnit](https://www.drupal.org/node/2116263)
# Execute all Webform PHPUnit tests.
cd core
php ../vendor/phpunit/phpunit/phpunit --group webform
cd core
# Execute individual PHPUnit tests.
export SIMPLETEST_DB=mysql://drupal_d8_dev:drupal.@dm1n@localhost/drupal_d8_dev;
# Functional test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Functional/WebformExampleFunctionalTest.php
# Kernal test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Kernal/Utility/WebformDialogHelperTest.php
# Unit test.
php ../vendor/phpunit/phpunit/phpunit ../modules/sandbox/webform/tests/src/Unit/Utility/WebformYamlTest.php
5. Generate release notes
-------------------------
[Git Release Notes for Drush](https://www.drupal.org/project/grn)
drush release-notes --nouser 8.x-5.0-VERSION 8.x-5.x
6. Tag and create a new release
-------------------------------
[Tag a release](https://www.drupal.org/node/1066342)
git tag 8.x-5.0-VERSION
git push --tags
git push origin tag 8.x-5.0-VERSION
[Create new release](https://www.drupal.org/node/add/project-release/2640714)
7. Upload screencast to YouTube
-------------------------------
- Title : Webform 8.x-5.x-betaXX
- Tags: Drupal 8,Webform,Form Builder
- Privacy: listed