Coming from the [New Expensify Forms](https://docs.google.com/document/d/1DI4jQ0nyfi2JczhPT440orwlXsTP_O-aGvg-HLmcbwI/edit#heading=h.mnjguil21u0a) design doc, we should refactor [RequestCallPage](https://github.com/Expensify/App/blob/2595343f78d6d9866684b96f8ba96862b9d2165f/src/pages/RequestCallPage.js) to use the new form component, follow the guidelines below: Here's an example of a Form refactor: https://github.com/Expensify/App/pull/9056 ## Guidelines 1. Replace the form component with Form.js. 2. Create a unique Onyx key in ONYXKEYS.FORM and pass it as the [formID](https://docs.google.com/document/d/15qBqIaRnuuOWpAz50Oc4U-873txonRqCaeBkrseN_8I/edit#heading=h.789lf03wn9l8) prop to Form. 3. Pass a [validate](https://docs.google.com/document/d/15qBqIaRnuuOWpAz50Oc4U-873txonRqCaeBkrseN_8I/edit#heading=h.vudloacn1xep) callback prop. 4. Pass an [onSubmit](https://docs.google.com/document/d/15qBqIaRnuuOWpAz50Oc4U-873txonRqCaeBkrseN_8I/edit#heading=h.a9p9e5um34c2) callback prop that calls the API via an action. 5. Update all inputs wrapped by Form, following the guidelines in [Refactor inputs](https://docs.google.com/document/d/1DI4jQ0nyfi2JczhPT440orwlXsTP_O-aGvg-HLmcbwI/edit#bookmark=kix.ao8ypttnbmcj). 6. Remove any unused code. ## Testing Verify that: - [ ] UI looks as it did before the refactor - [ ] Values can be added and edited - [ ] Errors are highlighted correctly (input border) - [ ] Error messages show up correctly - [ ] Draft values are saved properly - [ ] Form alerts are displayed correctly - [ ] Clicking the `fix the errors` link focuses the first input with error - [ ] No duplicate submission of the form occurs (when it's already submitting)
Activity
[-]Refactor Request a call page to use Form[/-][+][Form Refactor] Request a call page[/+][-][Form Refactor] Request a call page[/-][+][HOLD] [Form Refactor] Request a call page[/+]luacmartins commentedon Jun 29, 2022
Holding on push to page discussion as per this comment
luacmartins commentedon Jul 7, 2022
On hold!
luacmartins commentedon Jul 18, 2022
On hold
luacmartins commentedon Jul 27, 2022
On hold
luacmartins commentedon Aug 5, 2022
On hold
[-][HOLD] [Form Refactor] Request a call page[/-][+][Form Refactor] Request a call page[/+]luacmartins commentedon Aug 8, 2022
No longer on hold!
melvin-bot commentedon Aug 26, 2022
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
ntdiary commentedon Aug 26, 2022
Oh sorry, I think the bot's comment shouldn't be here (maybe it's my fault), I just wanted to cite this issue.
luacmartins commentedon Aug 26, 2022
@ntdiary no worries! these comments have been all over the place.
melvin-bot commentedon Sep 16, 2022
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.