Move all files to 2017/
This commit is contained in:
parent
ac7370f67f
commit
2875863330
15717 changed files with 0 additions and 0 deletions
239
2017/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md
Normal file
239
2017/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md
Normal file
|
@ -0,0 +1,239 @@
|
|||
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
|
||||
|
||||
# Apply remote patch
|
||||
curl https://www.drupal.org/files/issues/[project_name]-[issue-description]-[issue-number]-00.patch | git apply -
|
||||
|
||||
# Force apply patch
|
||||
patch -p1 < webform_whitespace_inconsistencies-2989606-5.diff
|
||||
|
||||
# Remove patch and untracked files
|
||||
git reset --hard; git clean -f -d
|
||||
|
||||
# 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
|
||||
cat 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 local and remote branch
|
||||
git branch -D [issue-number]-[issue-description]
|
||||
git push origin :[issue-number]-[issue-description]
|
||||
|
||||
# Delete remote branch
|
||||
git push origin --delete [issue-number]-[issue-description]
|
||||
```
|
||||
|
||||
**Generate Drush Make and Composer Files**
|
||||
|
||||
```bash
|
||||
drush webform-libraries-make > webform.libraries.make.yml
|
||||
drush webform-libraries-composer > composer.json
|
||||
```
|
||||
|
||||
**Manually Execute an Update Hook**
|
||||
|
||||
```bash
|
||||
drush php-eval 'module_load_include('install', 'webform'); webform_update_8144()';
|
||||
```
|
||||
|
||||
**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_examples_accessibility/webform_examples_accessibility.features.yml
|
||||
echo 'true' > modules/webform_example_element/webform_example_element.features.yml
|
||||
echo 'true' > modules/webform_example_composite/webform_example_composite.features.yml
|
||||
echo 'true' > modules/webform_example_handler/webform_example_handler.features.yml
|
||||
echo 'true' > modules/webform_example_element/webform_example_remote_post.features.yml
|
||||
|
||||
echo 'true' > modules/webform_templates/webform_templates.features.yml
|
||||
echo 'true' > modules/webform_templates/webform_templates.features.yml
|
||||
|
||||
echo 'true' > modules/webform_image_select/webform_image_select.features.yml
|
||||
echo 'true' > modules/webform_image_select/tests/modules/webform_image_select_test.features.yml
|
||||
|
||||
echo 'true' > modules/webform_node/webform_node.features.yml
|
||||
echo 'true' > modules/webform_node/tests/modules/webform_node_test_multiple/webform_node_test_multiple.features.yml
|
||||
echo 'true' > modules/webform_node/tests/modules/webform_node_test_translation/webform_node_test_translation.features.yml
|
||||
|
||||
echo 'true' > modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test/webform_scheduled_email_test.features.yml
|
||||
|
||||
echo 'true' > modules/webform_demo/webform_demo_application_evaluation/webform_demo_application_evaluation.features.yml
|
||||
echo 'true' > modules/webform_demo/webform_demo_event_registration/webform_demo_event_registration.features.yml
|
||||
echo 'true' > modules/webform_demo/webform_demo_region_contact/webform_demo_region_contact.features.yml
|
||||
|
||||
echo 'true' > tests/modules/webform_test/webform_test.features.yml
|
||||
echo 'true' > tests/modules/webform_test_ajax/webform_test_ajax.features.yml
|
||||
echo 'true' > tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.features.yml
|
||||
echo 'true' > tests/modules/webform_test_block_context/webform_test_block_context.features.yml
|
||||
echo 'true' > tests/modules/webform_test_block_custom/webform_test_block_custom.features.yml
|
||||
echo 'true' > tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.features.yml
|
||||
echo 'true' > tests/modules/webform_test_config_performance/webform_test_config_performance.features.yml
|
||||
echo 'true' > tests/modules/webform_test_custom_properties/webform_test_custom_properties.features.yml
|
||||
echo 'true' > tests/modules/webform_test_element/webform_test_element.features.yml
|
||||
echo 'true' > tests/modules/webform_test_handler/webform_test_handler.features.yml
|
||||
echo 'true' > tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.features.yml
|
||||
echo 'true' > tests/modules/webform_test_options/webform_test_options.features.yml
|
||||
echo 'true' > tests/modules/webform_test_paragraphs/webform_test_paragraphs.features.yml
|
||||
echo 'true' > tests/modules/webform_test_rest/webform_test_rest.features.yml
|
||||
echo 'true' > tests/modules/webform_test_submissions/webform_test_submissions.features.yml
|
||||
echo 'true' > tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.features.yml
|
||||
echo 'true' > tests/modules/webform_test_translation/webform_test_translation.features.yml
|
||||
echo 'true' > tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.features.yml
|
||||
echo 'true' > tests/modules/webform_test_validate/webform_test_validate.features.yml
|
||||
echo 'true' > tests/modules/webform_test_views/webform_test_views.features.yml
|
||||
echo 'true' > tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.features.yml
|
||||
|
||||
# Make sure all modules that are going to be exported are enabled
|
||||
drush en -y webform\
|
||||
webform_demo_application_evaluation\
|
||||
webform_demo_event_registration\
|
||||
webform_demo_region_contact\
|
||||
webform_examples\
|
||||
webform_examples_accessibility\
|
||||
webform_example_element\
|
||||
webform_example_handler\
|
||||
webform_example_remote_post\
|
||||
webform_image_select\
|
||||
webform_node\
|
||||
webform_templates\
|
||||
webform_test\
|
||||
webform_test_element\
|
||||
webform_test_handler\
|
||||
webform_test_handler_remote_post\
|
||||
webform_test_options\
|
||||
webform_test_paragraphs\
|
||||
webform_test_rest\
|
||||
webform_test_submissions\
|
||||
webform_test_translation\
|
||||
webform_test_views\
|
||||
webform_image_select_test\
|
||||
webform_node_test_multiple\
|
||||
webform_node_test_translation\
|
||||
webform_scheduled_email_test;
|
||||
|
||||
# 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_demo_event_registration
|
||||
drush features-export -y webform_demo_region_contact
|
||||
drush features-export -y webform_examples
|
||||
drush features-export -y webform_examples_accessibility
|
||||
drush features-export -y webform_example_element
|
||||
drush features-export -y webform_example_composite
|
||||
drush features-export -y webform_example_handler
|
||||
drush features-export -y webform_example_remote_post
|
||||
drush features-export -y webform_node
|
||||
drush features-export -y webform_image_select
|
||||
drush features-export -y webform_templates
|
||||
drush features-export -y webform_test
|
||||
drush features-export -y webform_test_block_submission_limit
|
||||
drush features-export -y webform_test_element
|
||||
drush features-export -y webform_test_handler
|
||||
drush features-export -y webform_test_handler_remote_post
|
||||
drush features-export -y webform_test_options
|
||||
drush features-export -y webform_test_rest
|
||||
drush features-export -y webform_test_submissions
|
||||
drush features-export -y webform_test_translation
|
||||
drush features-export -y webform_test_views
|
||||
drush features-export -y webform_test_paragraphs
|
||||
drush features-export -y webform_image_select_test
|
||||
drush features-export -y webform_node_test_multiple
|
||||
drush features-export -y webform_node_test_translation
|
||||
drush features-export -y webform_scheduled_email_test
|
||||
|
||||
# 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_demo_event_registration
|
||||
drush webform:tidy -y --dependencies webform_demo_region_contact
|
||||
drush webform:tidy -y --dependencies webform_examples
|
||||
drush webform:tidy -y --dependencies webform_examples_accessibility
|
||||
drush webform:tidy -y --dependencies webform_example_element
|
||||
drush webform:tidy -y --dependencies webform_example_composite
|
||||
drush webform:tidy -y --dependencies webform_example_handler
|
||||
drush webform:tidy -y --dependencies webform_example_remote_post
|
||||
drush webform:tidy -y --dependencies webform_image_select
|
||||
drush webform:tidy -y --dependencies webform_node
|
||||
drush webform:tidy -y --dependencies webform_templates
|
||||
drush webform:tidy -y --dependencies webform_test
|
||||
drush webform:tidy -y --dependencies webform_test_block_submission_limit
|
||||
drush webform:tidy -y --dependencies webform_test_element
|
||||
drush webform:tidy -y --dependencies webform_test_handler
|
||||
drush webform:tidy -y --dependencies webform_test_handler_remote_post
|
||||
drush webform:tidy -y --dependencies webform_test_options
|
||||
drush webform:tidy -y --dependencies webform_test_paragraphs
|
||||
drush webform:tidy -y --dependencies webform_test_rest
|
||||
drush webform:tidy -y --dependencies webform_test_submissions
|
||||
drush webform:tidy -y --dependencies webform_test_translation
|
||||
drush webform:tidy -y --dependencies webform_test_views
|
||||
drush webform:tidy -y --dependencies webform_image_select_test
|
||||
drush webform:tidy -y --dependencies webform_node_test_multiple
|
||||
drush webform:tidy -y --dependencies webform_node_test_translation
|
||||
drush webform:tidy -y --dependencies webform_scheduled_email_test
|
||||
|
||||
# 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_demo_event_registration
|
||||
drush features-import -y webform_demo_region_contact
|
||||
drush features-import -y webform_examples
|
||||
drush features-import -y webform_examples_accessibility
|
||||
drush features-import -y webform_example_element
|
||||
drush features-import -y webform_example_composite
|
||||
drush features-import -y webform_example_handler
|
||||
drush features-import -y webform_example_remote_post
|
||||
drush features-import -y webform_node
|
||||
drush features-import -y webform_image_select
|
||||
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_block_submission_limit
|
||||
drush features-import -y webform_test_handler
|
||||
drush features-import -y webform_test_handler_remote_post
|
||||
drush features-import -y webform_test_options
|
||||
drush features-import -y webform_test_paragraphs
|
||||
drush features-import -y webform_test_rest
|
||||
drush features-import -y webform_test_submissions
|
||||
drush features-import -y webform_test_translation
|
||||
drush features-import -y webform_test_views
|
||||
drush features-import -y webform_image_select_test
|
||||
drush features-import -y webform_node_test_multiple
|
||||
drush features-import -y webform_node_test_translation
|
||||
drush features-import -y webform_scheduled_email_test
|
||||
```
|
299
2017/web/modules/contrib/webform/docs/DEVELOPMENT-NOTES.md
Normal file
299
2017/web/modules/contrib/webform/docs/DEVELOPMENT-NOTES.md
Normal file
|
@ -0,0 +1,299 @@
|
|||
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]
|
||||
```
|
||||
|
||||
**Reverting a branch**
|
||||
|
||||
```bash
|
||||
# Remove anything staged but not committed:
|
||||
git reset --hard
|
||||
|
||||
# Adding changes to the last commit
|
||||
git commit --amendd ../
|
||||
|
||||
# Unstage a file about to be committed
|
||||
git reset HEAD <file>…
|
||||
|
||||
# Revert (in SVN terms) an uncommitted file to the copy in your latest commit
|
||||
git checkout -- filename
|
||||
```
|
||||
|
||||
**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
|
||||
|
||||
**Execute Webform update hook **
|
||||
|
||||
```bash
|
||||
drush php-eval 'module_load_include('install', 'webform'); webform_update_N();';
|
||||
```
|
||||
|
||||
**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
|
||||
# developer
|
||||
drush role-create developer
|
||||
drush role-add-perm developer '
|
||||
view the administration theme,access toolbar,access administration pages,access content overview,administer blocks,administer nodes,
|
||||
access webform overview,administer webform,edit webform assets'
|
||||
drush user-create developer --password="developer"
|
||||
drush user-add-role developer developer
|
||||
|
||||
# admin
|
||||
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
|
||||
|
||||
# manager
|
||||
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
|
||||
|
||||
# viewer
|
||||
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
|
||||
|
||||
# user
|
||||
drush role-create user
|
||||
drush user-create user --password="user"
|
||||
drush user-add-role user user
|
||||
|
||||
# any
|
||||
drush role-create any
|
||||
drush user-create any --password="any"
|
||||
drush role-add-perm any '
|
||||
view the administration theme,access toolbar,access administration pages,
|
||||
access webform overview,edit webform assets,
|
||||
create webform,edit any webform,delete any webform,
|
||||
view any webform submission, edit any webform submission, delete any webform submission,
|
||||
view webform submissions any node,edit webform submissions any node,delete webform submissions any node'
|
||||
drush user-add-role any any
|
||||
|
||||
# own
|
||||
drush role-create own
|
||||
drush user-create own --password="own"
|
||||
drush role-add-perm own '
|
||||
view the administration theme,,access toolbaraccess administration pages,
|
||||
access webform overview,edit webform assets,
|
||||
create webform,edit own webform,delete own webform,
|
||||
view own webform submission, edit own webform submission, delete own webform submission,
|
||||
view webform submissions own node,edit webform submissions own node,delete webform submissions own node'
|
||||
drush user-add-role own own
|
||||
|
||||
# anonymous
|
||||
drush role-add-perm anonymous '
|
||||
view own webform submission, edit own webform submission, delete own webform submission'
|
||||
```
|
||||
|
||||
**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
|
86
2017/web/modules/contrib/webform/docs/DRUSH-COMMANDS.md
Normal file
86
2017/web/modules/contrib/webform/docs/DRUSH-COMMANDS.md
Normal file
|
@ -0,0 +1,86 @@
|
|||
Steps for testing Drush 8.x and 9.x commands
|
||||
--------------------------------------------
|
||||
|
||||
# Drush 8.x and below
|
||||
|
||||
```bash
|
||||
# Version.
|
||||
drush --version
|
||||
|
||||
# Help.
|
||||
drush help --filter=webform
|
||||
|
||||
# Submissions.
|
||||
drush webform-generate contact
|
||||
drush webform-export contact
|
||||
drush webform-purge -y contact
|
||||
|
||||
# Option.
|
||||
drush webform-generate --entity-type=node --entity-id={ENTER_NID} contact
|
||||
drush webform-export --delimiter="\t" --header-format="key" contact
|
||||
|
||||
# Libraries.
|
||||
drush webform-libraries-status
|
||||
drush webform-libraries-remove
|
||||
drush webform-libraries-download
|
||||
drush webform-libraries-make
|
||||
drush webform-libraries-composer
|
||||
|
||||
# Tidy.
|
||||
drush webform-tidy
|
||||
|
||||
# Repair.
|
||||
drush webform-repair -y
|
||||
|
||||
# Docs.
|
||||
drush en -y readme
|
||||
drush webform-docs
|
||||
|
||||
# Composer.
|
||||
drush webform-composer-update
|
||||
|
||||
# Commands.
|
||||
drush webform-generate-commands
|
||||
```
|
||||
|
||||
# Drush 9.x and above
|
||||
|
||||
```bash
|
||||
# Version.
|
||||
drush --version
|
||||
|
||||
# Help.
|
||||
drush list --filter=webform
|
||||
|
||||
# Submissions.
|
||||
drush webform:generate contact
|
||||
drush webform:export contact
|
||||
drush webform:purge -y contact
|
||||
|
||||
# Options.
|
||||
drush webform:generate --entity-type=node --entity-id={ENTER_NID} contact
|
||||
drush webform:export --delimiter="\t" --header-format=key contact
|
||||
|
||||
# Libraries.
|
||||
drush webform:libraries:status
|
||||
drush webform:libraries:remove
|
||||
drush webform:libraries:download
|
||||
drush webform:libraries:make
|
||||
drush webform:libraries:composer
|
||||
|
||||
# Tidy.
|
||||
drush webform:tidy
|
||||
|
||||
# Repair.
|
||||
drush webform:repair -y
|
||||
|
||||
# Docs.
|
||||
drush en -y readme
|
||||
drush webform:docs
|
||||
|
||||
# Composer.
|
||||
drush webform:composer:update
|
||||
|
||||
# Commands.
|
||||
drush webform:generate:commands
|
||||
```
|
639
2017/web/modules/contrib/webform/docs/FEATURES.md
Normal file
639
2017/web/modules/contrib/webform/docs/FEATURES.md
Normal file
|
@ -0,0 +1,639 @@
|
|||
Features
|
||||
--------
|
||||
|
||||
|
||||
<blockquote>
|
||||
The Webform module provides all the features expected from an enterprise
|
||||
proprietary form builder combined with the flexibility and openness of Drupal
|
||||
</blockquote>
|
||||
|
||||
The Webform module allows you to build any type of form that can collect any
|
||||
type of data, which can be submitted to any application or system.
|
||||
Every single behavior and aspect of your forms and its inputs are customizable.
|
||||
Whether you need a multi-page form containing a multi-column input layout with
|
||||
conditional logic or a simple contact form that pushes data to a SalesForce/CRM,
|
||||
it is all possible using the Webform module for Drupal 8.
|
||||
|
||||
Drupal and the Webform module strives to be fully accessible to all users and
|
||||
site builders. Assistive technologies, including screen readers and
|
||||
keyboard access, are fully supported.
|
||||
|
||||
Besides being a feature rich form builder, the Webform module is part of the
|
||||
Drupal project's ecosystem and community.
|
||||
|
||||
<blockquote>
|
||||
The <a href="https://www.drupal.org/about">Drupal project</a> is open source software.
|
||||
Anyone can download, use, work on, and share it with others.
|
||||
It's built on principles like collaboration, globalism, and innovation.
|
||||
It's distributed under the terms of the <a href="https://www.gnu.org/copyleft/gpl.html">GNU General Public License</a> (GPL).
|
||||
There are <a href="https://www.drupal.org/about/licensing">no licensing fees</a>, ever. Drupal (and Webform) will always be free.
|
||||
</blockquote>
|
||||
|
||||
<div align="center">
|
||||
<table class="views-view-grid">
|
||||
<tr>
|
||||
<td><a class="action-button" href="https://youtu.be/VncMRSwjVto">▶ Watch video</a></td>
|
||||
<td><a class="action-button" href="https://simplytest.me/project/webform/8.x-5.x">Try Webform</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
## Form manager
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--form-manager.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--form-manager.png" alt="Form manager" /><br/>
|
||||
<strong>Form manager</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--form-manager-add.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--form-manager-add.png" alt="Form manager: Add webform" /><br/>
|
||||
<strong>Add webform</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The form manager provides a list of all available webforms.
|
||||
|
||||
Form manager features include:
|
||||
|
||||
- Filtering by keyword, category, and status
|
||||
- Sorting by total number of submissions
|
||||
- Archiving of old forms
|
||||
|
||||
## Form builder
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--form-builder.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--form-builder.png" alt="Form builder" /><br/>
|
||||
<strong>Form builder</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--form-builder.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--form-builder.png" alt="Edit element" /><br/>
|
||||
<strong>Edit element</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The Webform module provides an intuitive form builder based upon Drupal 8's
|
||||
best practices for user interface design and user experience.
|
||||
The form builder allows non-technical users to easily build
|
||||
and maintain webforms.
|
||||
|
||||
Form builder features include:
|
||||
|
||||
- Drag-n-drop form element management
|
||||
- Multi-column layout management
|
||||
- Conditional logic overview
|
||||
- Element duplication
|
||||
|
||||
## Configuration settings
|
||||
|
||||
Form behaviors, features, submission handling, messaging, and confirmations are completely customizable using global settings and/or form-specific settings.
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-general.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-general.png" alt="Configuration settings: General" /><br/>
|
||||
<strong>General</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-form.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-form.png" alt="Configuration settings: Form" /><br/>
|
||||
<strong>Form</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### General settings
|
||||
|
||||
Allow a webform's administrative information, paths, behaviors, and third-party settings to be customized.
|
||||
|
||||
General settings include:
|
||||
|
||||
- Categorization
|
||||
- Customizable paths
|
||||
- Disable saving of results
|
||||
- Ajax support
|
||||
|
||||
### Form settings
|
||||
|
||||
Allow a form's status, attributes, behaviors, labels, messages, wizard settings,
|
||||
and preview to be customized.
|
||||
|
||||
Form settings include:
|
||||
|
||||
- Open and close date/time scheduling
|
||||
- Login redirection with custom messaging.
|
||||
- Multiple step wizard forms
|
||||
- Submission preview
|
||||
- Input prepopulation using query string parameters.
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-submissions.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-submissions.png" alt="Configuration settings: Submisssions" /><br/>
|
||||
<strong>Submisssions</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-confirmation.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-confirmation.png" alt="Configuration settings: Confirmation" /><br/>
|
||||
<strong>Confirmation</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Submissions settings
|
||||
|
||||
Allows a submission's labels, behaviors, limits, and draft settings to be
|
||||
customized.
|
||||
|
||||
Submission settings include:
|
||||
|
||||
- Saving of drafts
|
||||
- Automatic purging of submissions
|
||||
- Submission limits per user and/or per form
|
||||
- Autofilling form using previously submitted values
|
||||
|
||||
### Confirmation settings
|
||||
|
||||
Allows the form's confirmation type, message, and URL to be customized.
|
||||
|
||||
Confirmation types include:
|
||||
|
||||
- Dedicated page
|
||||
- Redirect to internal or external URL
|
||||
- Displaying of a custom status message
|
||||
- Opening a modal dialog
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-handlers.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-handlers.png" alt="Configuration settings: Handlers" /><br/>
|
||||
<strong>Handlers</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-handlers-email.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-handlers-email.png" alt="Configuration settings: Email handler" /><br/>
|
||||
<strong>Email handler</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
### Emails / Handlers
|
||||
|
||||
Allows additional actions and behaviors to be processed when a webform or
|
||||
submission is created, updated, or deleted. Handlers are used to route
|
||||
submitted data to external applications and send notifications & confirmations.
|
||||
|
||||
Email support features include:
|
||||
|
||||
- Previewing and resending emails
|
||||
- Sending HTML emails
|
||||
- File attachments (requires the Mail System and Swift Mailer module.)
|
||||
- HTML and plain-text email-friendly Twig templates
|
||||
- Customizable display formats for individual form elements
|
||||
|
||||
Remote post features include:
|
||||
- Posting selected elements to a remote server
|
||||
- Adding custom parameters to remote post requests
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-assets.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-assets.png" alt="Configuration settings: CSS/JS assets" /><br/>
|
||||
<strong>CSS/JS assets</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--settings-access.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--settings-access.png" alt="Configuration settings: Access" /><br/>
|
||||
<strong>Access</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### CSS/JS assets
|
||||
|
||||
The CSS/JS assets page allows site builders to attach custom CSS and JavaScript
|
||||
to a webform. Custom CSS can be used to make simple layout or design tweaks
|
||||
to a form. Custom JavaScript allows additional conditional logic and
|
||||
behaviors to be added to a form.
|
||||
|
||||
### Access settings
|
||||
|
||||
Allows an administrator to determine who can administer a webform and/or create,
|
||||
update, delete, and purge webform submissions.
|
||||
|
||||
## Elements
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--elements.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--elements.png" alt="Elements" /><br/>
|
||||
<strong>Elements</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--elements-settings.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--elements-settings.png" alt="Element settings" /><br/>
|
||||
<strong>Element settings</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The Webform module is built directly on top of Drupal 8's Form API.
|
||||
Every form element available in Drupal 8 is supported by the Webform module.
|
||||
|
||||
Form elements include:
|
||||
|
||||
- **Basic HTML**: Textfield, Textareas, Checkboxes, Radios, Select menu, Password, and more...
|
||||
- **Advanced HTML5**: Email, Url, Number, Telephone, Date, Number, Range, and more...
|
||||
- **Advanced Drupal**: File uploads, Entity References, Table select, Date list, and more...
|
||||
- **Widgets**: Likert scale, Star rating, Buttons, Geolocation, Terms of service, Select/Checkboxes/Radios with other, and more...
|
||||
- **Markup**: Dismissible messages, Basic HTML, Advanced HTML, Details, and Fieldsets.
|
||||
- **Composites**: Name, Address, Contact, Credit Card, and event custom composites
|
||||
- **Computed**: Calculated values using Tokens and Twig with Ajax support.
|
||||
|
||||
### Element settings
|
||||
|
||||
All of Drupal 8's default form element properties and behaviors are supported.
|
||||
There are also several custom webform element properties and settings available
|
||||
to enhance a form element's behavior.
|
||||
|
||||
Standard and custom properties allow for:
|
||||
|
||||
- Customizable error validation 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/) or [Chosen](https://harvesthq.github.io/chosen/) replacement of select boxes
|
||||
- Word and character counting for text elements
|
||||
- Help tooltips (using [jQuery UI Tooltip](https://jqueryui.com/tooltip/))
|
||||
- More information slideouts
|
||||
- Regular expression pattern validation
|
||||
- Private elements, visible only to administrators
|
||||
- Unique values per element
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--elements-conditional.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--elements-conditional.png" alt="Conditional logic" /><br/>
|
||||
<strong>Conditional logic</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--elements-source.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--elements-source.png" alt="View source" /><br/>
|
||||
<strong>View source</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### States/Conditional logic
|
||||
|
||||
Drupal's State API can be used by developers to provide conditional logic
|
||||
to hide and show form elements.
|
||||
|
||||
Drupal's State API supports:
|
||||
|
||||
- Show/Hide
|
||||
- Required/Optional
|
||||
- Open/Close
|
||||
- Enable/Disable
|
||||
|
||||
### Viewing source
|
||||
|
||||
At the heart of a Webform module's form elements is a Drupal
|
||||
[render array](https://www.drupal.org/docs/8/api/render-api/render-arrays),
|
||||
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.
|
||||
|
||||
## Forms
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--forms-accessiblity.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--forms-accessiblity.png" alt="Accessibility" /><br/>
|
||||
<strong>Accessibility</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--forms-wizard.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--forms-wizard.png" alt="Multistep form" /><br/>
|
||||
<strong>Multistep form</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Accessibility
|
||||
|
||||
The outputted forms and even the Webform module's administrative interface
|
||||
(i.e. form builder) are accessible using keyboard navigation and screen readers.
|
||||
The Webform module complies with [WCAG 2.0](http://www.w3.org/TR/WCAG20/#contents)
|
||||
and [ATAG 2.0](http://www.w3.org/TR/ATAG20/#contents) guidelines.
|
||||
|
||||
### Multistep form
|
||||
|
||||
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 form.
|
||||
|
||||
Multistep form features include:
|
||||
|
||||
- Customizable progress bar
|
||||
- Customizable previous and next button labels and styles
|
||||
- Saving drafts between steps
|
||||
|
||||
### Drupal integration
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--forms-block.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--forms-block.png" alt="Block" /><br/>
|
||||
<strong>Block</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--forms-node.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--forms-node.png" alt="Node" /><br/>
|
||||
<strong>Node</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Webforms can be attached to nodes or displayed as blocks.
|
||||
Webforms can also have dedicated SEO-friendly URLs.
|
||||
Form elements are render arrays that can easily be altered using
|
||||
custom hooks and/or plugins.
|
||||
|
||||
## Results management
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--results.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--results.png" alt="Results" /><br/>
|
||||
<strong>Results</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--results-customize.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--results-customize.png" alt="Customize results" /><br/>
|
||||
<strong>Customize results </strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Form submissions can optionally be stored in the database, reviewed,
|
||||
and downloaded. Submissions can also be flagged with administrative notes.
|
||||
|
||||
Results management features include:
|
||||
|
||||
- Submission flagging, locking, and 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
|
||||
- [Drupal Views](https://www.drupal.org/docs/8/core/modules/views) integration
|
||||
for advanced reporting.
|
||||
|
||||
## Access controls
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--access-permissions.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--access-permissions.png" alt="Permissions" /><br/>
|
||||
<strong>Permissions</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--access-element.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--access-element.png" alt="Element access" /><br/>
|
||||
<strong>Element access</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The Webform module provides full access controls and permissions 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.
|
||||
The Webform access submodule allows you to even setup reusable permission
|
||||
groups which can be applied to multiple instances of the same webform.
|
||||
|
||||
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
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--templates.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--templates.png" alt="Templates" /><br/>
|
||||
<strong>Templates</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--templates-preview.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--templates-preview.png" alt="Templates preview" /><br/>
|
||||
<strong>Templates preview</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
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
|
||||
|
||||
## Reusable options
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--options.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--options.png" alt="Options" /><br/>
|
||||
<strong>Options</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--options-likert.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--options-likert.png" alt="Likert" /><br/>
|
||||
<strong>Likert</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
Administrators can define reusable global options for select menus, checkboxes,
|
||||
and radio buttons. The Webform module includes default options for states,
|
||||
countries, demographics, likert answers, and more.
|
||||
|
||||
Reusable options include:
|
||||
|
||||
- **Geographic**: Languages, country, and states
|
||||
- **Date and time**: Days, months, and time zones
|
||||
- **Demographic**: Education, employment status, ethnicity, Industry,
|
||||
languages, marital status, relationship, size, and job titles
|
||||
- **Likert**: Agreement, comparison, importance, quality, satisfaction,
|
||||
ten scale, and would you
|
||||
|
||||
|
||||
## Internationalization
|
||||
|
||||
Forms and configuration can be translated into multiple languages using
|
||||
Drupal's [configuration translation system](https://www.drupal.org/docs/8/core/modules/config-translation.
|
||||
|
||||
## Add-ons
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--addons.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--addons.png" alt="Add-ons" /><br/>
|
||||
<strong>Add-ons</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--addons-webform-analysis.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--addons-webform-analysis.png" alt="Analysis" /><br/>
|
||||
<strong>Analysis</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
There are [dozens of add-ons available](https://www.drupal.org/node/2837065)
|
||||
that extend and/or provide additional functionality to the Webform module
|
||||
and Drupal's Form API.
|
||||
|
||||
Add-ons include:
|
||||
|
||||
- Analysis for creating graphs and charts
|
||||
- CRM integration including SalesForce, HubSpot, MyEmma, SugarCRM, more…
|
||||
- SPAM protection
|
||||
- Advanced workflows
|
||||
- Data encryption
|
||||
- GDPR compliance
|
||||
|
||||
## Development tools
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--devel-test.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--devel-test.png" alt="Test" /><br/>
|
||||
<strong>Test</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--devel-api.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--devel-api.png" alt="API" /><br/>
|
||||
<strong>API</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Examples and tools are provided to help developers get started customizing
|
||||
existing features and adding new features to the Webform module.
|
||||
|
||||
Development tools include:
|
||||
|
||||
- Test forms using customizable default values
|
||||
- Easy to export configuration files
|
||||
- Debugging tools for all handlers
|
||||
- Examples for external API integration using remotes posts or custom code
|
||||
- Example modules for creating custom elements and handlers
|
||||
- Demos for building event registration and application evaluation system
|
||||
|
||||
## Drush & Composer integration
|
||||
|
||||
<table class="views-view-grid" width="100%">
|
||||
<tr>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--drush.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--drush.png" alt="Drush" /><br/>
|
||||
<strong>Drush</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
<td width="50%"><div class="note">
|
||||
<a href="https://www.drupal.org/files/webform-8.x.5.x-features--drush-composer.png">
|
||||
<img src="https://www.drupal.org/files/webform-8.x.5.x-features--drush-composer.png" alt="Composer" /><br/>
|
||||
<strong>Composer</strong>
|
||||
</a>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Drush commands are provided to:
|
||||
|
||||
- Generate multiple submissions
|
||||
- Export submissions
|
||||
- Purge submissions
|
||||
- Download and manage third-party libraries
|
||||
- Generate a composer.js file for third-party libraries
|
||||
- Tidy YAML configuration files
|
||||
|
||||
|
||||
|
||||
|
||||
|
131
2017/web/modules/contrib/webform/docs/RELEASE-NOTES.md
Normal file
131
2017/web/modules/contrib/webform/docs/RELEASE-NOTES.md
Normal file
|
@ -0,0 +1,131 @@
|
|||
Steps for creating a new release
|
||||
--------------------------------
|
||||
|
||||
1. Review code
|
||||
2. Review accessibility
|
||||
3. Run tests
|
||||
4. Generate release notes
|
||||
5. Tag and create a new release
|
||||
|
||||
|
||||
1. Review code
|
||||
--------------
|
||||
|
||||
# Remove files that should never be reviewed.
|
||||
cd modules/sandbox/webform
|
||||
rm *.patch interdiff-*
|
||||
|
||||
[PHP](https://www.drupal.org/node/1587138)
|
||||
|
||||
# Check Drupal PHP coding standards
|
||||
cd /var/www/sites/d8_webform/web
|
||||
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info modules/sandbox/webform > ~/webform-php-coding-standards.txt
|
||||
cat ~/webform-php-coding-standards.txt
|
||||
|
||||
# Check Drupal PHP best practices
|
||||
cd /var/www/sites/d8_webform/web
|
||||
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info modules/sandbox/webform > ~/webform-php-best-practice.txt
|
||||
cat ~/webform-php-best-practice.txt
|
||||
|
||||
[JavaScript](https://www.drupal.org/node/2873849)
|
||||
|
||||
# Install Eslint. (One-time)
|
||||
cd /var/www/sites/d8_webform/web/core
|
||||
yarn install
|
||||
|
||||
# Check Drupal JavaScript (ES5) legacy coding standards.
|
||||
cd /var/www/sites/d8_webform/web
|
||||
core/node_modules/.bin/eslint --no-eslintrc -c=core/.eslintrc.legacy.json --ext=.js modules/sandbox/webform > ~/webform-javascript-coding-standards.txt
|
||||
cat ~/webform-javascript-coding-standards.txt
|
||||
|
||||
|
||||
[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
|
||||
|
||||
|
||||
2. Review accessibility
|
||||
-----------------------
|
||||
|
||||
[Pa11y](http://pa11y.org/)
|
||||
|
||||
Pa11y is your automated accessibility testing pal.
|
||||
|
||||
Notes
|
||||
- Requires node 8.x+
|
||||
|
||||
|
||||
drush en -y webform_example_accessibility
|
||||
pa11y http://localhost/wf/webform/example_accessibility_basic
|
||||
pa11y http://localhost/wf/webform/example_accessibility_advanced
|
||||
pa11y http://localhost/wf/webform/example_accessibility_containers
|
||||
pa11y http://localhost/wf/webform/example_accessibility_wizard
|
||||
|
||||
|
||||
3. Run tests
|
||||
------------
|
||||
|
||||
[SimpleTest](https://www.drupal.org/node/645286)
|
||||
|
||||
# Run all tests
|
||||
cd /var/www/sites/d8_webform
|
||||
php core/scripts/run-tests.sh --suppress-deprecations --url http://localhost/wf --module webform --dburl mysql://drupal_d8_webform:drupal.@dm1n@localhost/drupal_d8_webform
|
||||
|
||||
# Run single tests
|
||||
cd /var/www/sites/d8_webform
|
||||
php core/scripts/run-tests.sh --suppress-deprecations --url http://localhost/wf --verbose --class "Drupal\Tests\webform\Functional\WebformListBuilderTest"
|
||||
|
||||
[PHPUnit](https://www.drupal.org/node/2116263)
|
||||
|
||||
Notes
|
||||
- Links to PHP Unit HTML responses are not being printed by PHPStorm
|
||||
|
||||
References
|
||||
- [Issue #2870145: Set printerClass in phpunit.xml.dist](https://www.drupal.org/node/2870145)
|
||||
- [Lesson 10.2 - Unit testing](https://docs.acquia.com/article/lesson-102-unit-testing)
|
||||
|
||||
# Export database and base URL.
|
||||
export SIMPLETEST_DB=mysql://drupal_d8_webform:drupal.@dm1n@localhost/drupal_d8_webform;
|
||||
export SIMPLETEST_BASE_URL='http://localhost/wf';
|
||||
|
||||
# Execute all Webform PHPUnit tests.
|
||||
cd /var/www/sites/d8_webform/web/core
|
||||
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" --group webform
|
||||
|
||||
# Execute individual PHPUnit tests.
|
||||
cd /var/www/sites/d8_webform/web/core
|
||||
|
||||
# Functional test.
|
||||
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Functional/WebformExampleFunctionalTest.php
|
||||
|
||||
# Kernal test.
|
||||
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Kernal/Utility/WebformDialogHelperTest.php
|
||||
|
||||
# Unit test.
|
||||
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Unit/Utility/WebformYamlTest.php
|
||||
|
||||
php ../../vendor/phpunit/phpunit/phpunit --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter" ../modules/sandbox/webform/tests/src/Unit/Access/WebformAccessCheckTest
|
||||
|
||||
|
||||
4. 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
|
||||
|
||||
|
||||
5. 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)
|
85
2017/web/modules/contrib/webform/docs/UPDATE-LIBRARIES.md
Normal file
85
2017/web/modules/contrib/webform/docs/UPDATE-LIBRARIES.md
Normal file
|
@ -0,0 +1,85 @@
|
|||
Steps for updating libraries
|
||||
----------------------------
|
||||
|
||||
1. Create a ticket in the Webform issue queue
|
||||
2. Create a list of all recent releases
|
||||
3. Update WebformLibrariesManager
|
||||
4. Update webform.libraries.yml
|
||||
5. Test changes
|
||||
6. Update webform_libraries.module
|
||||
7. Update composer.libraries.json
|
||||
|
||||
|
||||
1. Create a ticket in the Webform issue queue
|
||||
----------------------------------------------
|
||||
|
||||
- https://www.drupal.org/node/add/project-issue/webform
|
||||
|
||||
|
||||
2. Create a list of all recent releases
|
||||
---------------------------------------
|
||||
|
||||
- Enable all external libraries (admin/structure/webform/config/libraries)
|
||||
|
||||
- Manually check for new releases. Only update to stable releases.
|
||||
|
||||
- Add list of updated external libraries to issue on Drupal.org
|
||||
|
||||
|
||||
3. Update WebformLibrariesManager
|
||||
---------------------------------
|
||||
|
||||
- \Drupal\webform\WebformLibrariesManager::initLibraries
|
||||
|
||||
|
||||
4. Update webform.libraries.yml
|
||||
---------------------------------
|
||||
|
||||
- webform.libraries.yml
|
||||
|
||||
|
||||
5. Test changes
|
||||
---------------
|
||||
|
||||
Check external libraries are loaded from CDN.
|
||||
|
||||
drush webform:libraries:remove
|
||||
|
||||
Check external libraries are download.
|
||||
|
||||
drush webform:libraries:download
|
||||
|
||||
|
||||
6. Update webform_libraries.module
|
||||
----------------------------------
|
||||
|
||||
Enable and download all libraries
|
||||
|
||||
cd /var/www/sites/d8_webform
|
||||
drush php-eval "\Drupal::configFactory()->getEditable('webform.settings')->set('libraries.excluded_libraries', [])->save();"
|
||||
drush en -y webform_image_select
|
||||
drush webform:libraries:download
|
||||
|
||||
Update libraries.zip
|
||||
|
||||
# Remove libraries.zip.
|
||||
rm -Rf /var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/libraries.zip
|
||||
|
||||
# Create libraries.zip
|
||||
cd /var/www/sites/d8_webform/web/
|
||||
zip -r libraries.zip libraries
|
||||
mv libraries.zip /private/var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/libraries.zip
|
||||
|
||||
Commit changes
|
||||
|
||||
# Commit changes.
|
||||
cd /private/var/www/sites/d8_webform/web/modules/sandbox/webform_libraries/
|
||||
git commit -am"Update webform_libraries"
|
||||
git push
|
||||
|
||||
|
||||
7. Update composer.libraries.json
|
||||
----------------------------------
|
||||
|
||||
cd /private/var/www/sites/d8_webform/web/modules/sandbox/webform
|
||||
drush webform:libraries:composer > composer.libraries.json
|
Reference in a new issue