Get Form Membership Context
Whether this form names a membership field, and whether a plan links to it.
Reachable by anyone who can send a form, not only by template editors: the send
dialog refuses the whole selection when this probe fails, so gating it on templates
alone would make every form unsendable for a role holding submissions-read on its
own — the permission the forms list itself accepts (GET /forms/table).
Answered here rather than in the console because the form lists it is offered from
carry no blocks (FormTable), so the client would have to fetch the whole
structure to tell — and re-deriving the token rule client-side has already drifted
from this one twice. A saved response is the third reason: its text lives in Settings
rather than in the form, so a client holding the whole structure still could not tell.
has_linked_plan is a boolean because 0↔1 is the whole question: a form with
membership variables and no plan is authorable and saveable but not fillable. How
many plans use it past the first changes nothing — such a form is sent from the
patient’s membership either way, and the plan comes from the enrolment rather than
from anything counted here. The memberships list filtered by form_id would report
that count, but it needs memberships:read and the editor is gated on forms
permission alone.

