Closed DanceParty closed 4 years ago
You mean placeholder? It is option uniPlaceholder
would that work? Just passing through the current value for that collection item into that parameter?
If so, sorry for opening an issue. Thanks!
I do not know if I understand your problem, first please try this option
Not sure this solved the problem.
Okay...
I have a field People
and that collection contains upwards of 3000 items in it. Because of this, I am using the optionsMethod
and only passing through a few at a time (dependent on another field).
However, when I create an update form, all of my fields, except People
are pre-populated (People should be populated with John Doe
, but is instead blank) with the existing value (People
is the only item using optionsMethod
).
I just tried returning the value and label as a placeholder, thinking that would be a kind of work around
[
{ label: "john doe", value: "john doe" }
]
but that didnt work and just returns a placeholder [Object, object]
placeholder need only label - just string
When they go to submit the update form, will it store the same value as before in that case?
For Example:
In the People insert form, I am using a label "First Name, Last Name", but the value is a Number ID
so if I pass only a String, I am curious as to how I can maintain the value (Number ID?)
To continue this, it seems as though the value is present but is hidden.
When the page loads, it is blank,
Even, when typing a new name, the selection remains blank,
However, when I select this new name, the original name plus the new name appear in the selection (I do not have multiple = true btw).
Any ideas?
Please take a look at demo: http://universe-autoform-select.stg.vazco.eu/
There is placeholder on fields with remote options:
Placeholder in these uses seems to be a global for the entire autoform. I am looking for it to show the currently in-use value for a specific afQuickField while using optionsMethod
Here is the form:
Here is what the form should be showing:
and here is the code
{{#autoForm collection="Equipment" doc=getEquipment id=updateEquipment type="update"}}
{{> afQuickField name="Company" type="universe-select" options=companyOptions}}
{{> afQuickField name="Employee" type="universe-select" optionsMethod="employeeEquipmentOptions" optionsMethodParams=employeeHelper}}
{{> afQuickField name="Office" type="universe-select" options=officeOptions}}
{{/autoForm}}
If you notice, the only field not returning the value that is currently in use is the one using optionsMethod instead of options.
So when I go to update the form, I am forced to re-enter values that should be appearing in the first place.
We've decided to archive some of our repositories as we are no longer using nor willing to maintain them. Part of this process involves closing related issues and PRs. If you still need help, do contact us on opensource@vazco.eu.
I have a couple fields using
universe-select
and when loading an update form, the values using theoptions
values load properly, but when using theoptionsMethod
, they are blank values, which would force the user to re-enter values that should already be present.