This PR adds a new helper function to the DonationPage model called get_fru_form_id, which give users the ability to render a custom FRU form if needed through the use of the URL parameter form_id.
If a valid form ID is used (8 alphabetical characters), the template context is then updated to use the custom form's ID.
However if the attempted value is invalid or not set at all, then the template context is passed the default FRU form ID instead.
Screenshots
(no form id set)localhost:8000:
(valid custom form ID)localhost:8000/?form_id=XVFNMBAK :
(invalid form ID)localhost:8000/?form_id=123A / localhost:8000/?form_id= :
Related PRs/issues #1752
Description
This PR adds a new helper function to the
DonationPage
model calledget_fru_form_id
, which give users the ability to render a custom FRU form if needed through the use of the URL parameterform_id
.If a valid form ID is used (8 alphabetical characters), the template context is then updated to use the custom form's ID.
However if the attempted value is invalid or not set at all, then the template context is passed the default FRU form ID instead.
Screenshots
(no form id set)
localhost:8000
:(valid custom form ID)
localhost:8000/?form_id=XVFNMBAK
:(invalid form ID)
localhost:8000/?form_id=123A
/localhost:8000/?form_id=
:Steps to test:
Checklist
Tests