department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 201 forks source link

Update form config subtitle option #87470

Open Mottie opened 3 months ago

Mottie commented 3 months ago

Description

The subTitle within the form config now accepts passing in a function.

Options Value Type Description Example
subTitle string or function The subtitle of the form, usually the form number. The subtitle is rendered on all pages when there's also a title. Accepts a string or function; params include (currentLocation, formConfig, formData, children). subTitle: 'VA Form 10182 (Notice of Disagreement)' or subTitle: ({ formData }) => formData.changeSubTitle ? 'Form 345 with Form 123' : 'Form 123'

Relevant URLs

Which type of team are you on? (Platform team, VFS team, or Leadership)

VFS team: Benefits Decision Reviews

jknipes commented 3 months ago

Hi @Mottie , thanks for your content suggestions. The Platform Content team will review your request and put it in our backlog to refine for next steps.

jknipes commented 3 months ago

@Mottie could you please advise how the suggested change would look on Platform Website > va forms library form config options page? It appears the suggestion is a simple update to that text on the page

Mottie commented 3 months ago

Yes, it's an update to the text already on the page. The subTitle option now supports passing in a function. Previously, it only supported a text value.