[Question] How to pass authorization token through metadata to the select component to fetch data
Is there a way where we can pass token through metadata to select a component and populate the list. For example:
<formio src="https://abc.com/test/dropdown" (change)="changed($event)" [submission]="submissionData"></formio>
submissionData: any = {
metadata: {
token: "]vyxabc"
}
};
And in a select component when I am trying to access {{metadata.token}}. Its not working. can you please highlight on this how we can use this.
I bet this is because "metadata" is not passed to the interpolate function of select components, but it could be added by making a change @ https://github.com/formio/formio.js/blob/master/src/components/select/Select.js#L412 where the request is made. We just need to pass these header values through interpolate.
@travist what if we need to pass other values as well? Like now we need to pass as a submission value and use it across the different component. Can we make metadata as a general approach for all the component? So that it won't affect submission data object.
Yes... metadata is a way to add additional metadata to a submission object that does not need a form field associated with that data. It can be used to store any JSON data along with the submission..
We're currently addressing a backlog of GitHub issues, and as part of this effort, some inactive issues may be marked as closed. This isn't a dismissal, but a step toward more efficient tracking.
If you feel the issue is still relevant, please re-open and we'll ensure it gets the attention it deserves. Your understanding is appreciated as we work to enhance our open-source responsiveness.