Skip to content

Commit

Permalink
VATEAM-101160: Create "Custom Step" paragraph and text input componen…
Browse files Browse the repository at this point in the history
…t in Drupal (#20402)

Creates Custom Step, Page, and Text Input Paragraph types for use with the Digital Form content type.
  • Loading branch information
derekhouck authored Feb 18, 2025
1 parent 29a3e1b commit d6187a1
Show file tree
Hide file tree
Showing 33 changed files with 1,124 additions and 70 deletions.
28 changes: 25 additions & 3 deletions config/sync/core.entity_form_display.node.digital_form.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- paragraphs_browser
- paragraphs_features
- path
- textfield_counter
third_party_settings:
field_group:
group_editorial_workflow:
Expand Down Expand Up @@ -113,12 +114,19 @@ content:
settings: { }
third_party_settings: { }
field_omb_number:
type: string_textfield
type: string_textfield_with_counter
weight: 8
region: content
settings:
size: 9
placeholder: XXXX-XXXX
use_field_maxlength: true
maxlength: 0
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
field_respondent_burden:
type: number
Expand All @@ -128,12 +136,19 @@ content:
placeholder: ''
third_party_settings: { }
field_va_form_number:
type: string_textfield
type: string_textfield_with_counter
weight: 1
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: true
maxlength: 0
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
moderation_state:
type: moderation_state_default
Expand All @@ -148,12 +163,19 @@ content:
settings: { }
third_party_settings: { }
title:
type: string_textfield
type: string_textfield_with_counter
weight: 0
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: true
maxlength: 52
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
hidden:
created: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
uuid: 7fab53aa-aa40-44c5-b542-8169ab0a7563
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.digital_form_custom_step.field_digital_form_pages
- field.field.paragraph.digital_form_custom_step.field_title
- paragraphs.paragraphs_type.digital_form_custom_step
module:
- paragraphs
- textfield_counter
id: paragraph.digital_form_custom_step.default
targetEntityType: paragraph
bundle: digital_form_custom_step
mode: default
content:
field_digital_form_pages:
type: paragraphs
weight: 2
region: content
settings:
title: Paragraph
title_plural: Paragraphs
edit_mode: open
closed_mode: summary
autocollapse: none
closed_mode_threshold: 0
add_mode: dropdown
form_display_mode: default
default_paragraph_type: ''
features:
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
field_title:
type: string_textfield_with_counter
weight: 1
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: false
maxlength: 255
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
uuid: 4638e41e-d5a7-499e-9ecd-06dec3075515
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.digital_form_page.field_digital_form_body_text
- field.field.paragraph.digital_form_page.field_digital_form_components
- field.field.paragraph.digital_form_page.field_title
- paragraphs.paragraphs_type.digital_form_page
module:
- paragraphs
- textfield_counter
id: paragraph.digital_form_page.default
targetEntityType: paragraph
bundle: digital_form_page
mode: default
content:
field_digital_form_body_text:
type: string_textarea
weight: 2
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_digital_form_components:
type: paragraphs
weight: 3
region: content
settings:
title: Paragraph
title_plural: Paragraphs
edit_mode: open
closed_mode: summary
autocollapse: none
closed_mode_threshold: 0
add_mode: dropdown
form_display_mode: default
default_paragraph_type: ''
features:
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
field_title:
type: string_textfield_with_counter
weight: 1
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: false
maxlength: 255
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
uuid: 321a0bd8-f075-477b-b5f9-089ca60d4cb7
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.digital_form_text_input.field_digital_form_hint_text
- field.field.paragraph.digital_form_text_input.field_digital_form_label
- field.field.paragraph.digital_form_text_input.field_digital_form_required
- paragraphs.paragraphs_type.digital_form_text_input
module:
- textfield_counter
id: paragraph.digital_form_text_input.default
targetEntityType: paragraph
bundle: digital_form_text_input
mode: default
content:
field_digital_form_hint_text:
type: string_textfield_with_counter
weight: 3
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: false
maxlength: 255
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
field_digital_form_label:
type: string_textfield_with_counter
weight: 0
region: content
settings:
size: 60
placeholder: ''
use_field_maxlength: false
maxlength: 255
counter_position: after
js_prevent_submit: true
count_only_mode: false
count_html_characters: true
textcount_status_message: 'Characters Remaining: <span class="remaining_count">@remaining_count</span>'
third_party_settings: { }
field_digital_form_required:
type: boolean_checkbox
weight: 1
region: content
settings:
display_label: true
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
uuid: 57860026-6e03-4688-9070-b8e3cab424bb
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.digital_form_custom_step.field_digital_form_pages
- field.field.paragraph.digital_form_custom_step.field_title
- paragraphs.paragraphs_type.digital_form_custom_step
module:
- entity_reference_revisions
id: paragraph.digital_form_custom_step.default
targetEntityType: paragraph
bundle: digital_form_custom_step
mode: default
content:
field_digital_form_pages:
type: entity_reference_revisions_entity_view
label: above
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 1
region: content
field_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden:
breadcrumbs: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: 24380256-d404-4645-a370-c8bfa70dbecb
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.paragraph.user_guides
- field.field.paragraph.digital_form_custom_step.field_digital_form_pages
- field.field.paragraph.digital_form_custom_step.field_title
- paragraphs.paragraphs_type.digital_form_custom_step
id: paragraph.digital_form_custom_step.user_guides
targetEntityType: paragraph
bundle: digital_form_custom_step
mode: user_guides
content:
field_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden:
breadcrumbs: true
field_digital_form_pages: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
uuid: 1a8ef389-b78e-4476-a46c-8f5eec313a4c
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.digital_form_page.field_digital_form_body_text
- field.field.paragraph.digital_form_page.field_digital_form_components
- field.field.paragraph.digital_form_page.field_title
- paragraphs.paragraphs_type.digital_form_page
module:
- entity_reference_revisions
id: paragraph.digital_form_page.default
targetEntityType: paragraph
bundle: digital_form_page
mode: default
content:
field_digital_form_body_text:
type: basic_string
label: above
settings: { }
third_party_settings: { }
weight: 1
region: content
field_digital_form_components:
type: entity_reference_revisions_entity_view
label: above
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 2
region: content
field_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden:
breadcrumbs: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
uuid: 64f49bda-1392-46c9-bafc-2faba4d3f673
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.paragraph.user_guides
- field.field.paragraph.digital_form_page.field_digital_form_body_text
- field.field.paragraph.digital_form_page.field_digital_form_components
- field.field.paragraph.digital_form_page.field_title
- paragraphs.paragraphs_type.digital_form_page
id: paragraph.digital_form_page.user_guides
targetEntityType: paragraph
bundle: digital_form_page
mode: user_guides
content:
field_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden:
breadcrumbs: true
field_digital_form_body_text: true
field_digital_form_components: true
search_api_excerpt: true
Loading

0 comments on commit d6187a1

Please sign in to comment.