Closed schneiderlin closed 1 week ago
Look again. ?!
is a helper that does just that, and it is present in the code you referenced:
...
field-label (?! (or
(get-in options [::field-labels k])
(::field-label attribute)
(ao/label attribute)
(some-> k name str/capitalize (str/replace #"-" " "))) form-instance)]
...
perhaps you misunderstood...it is:
{:k (fn ...)
:k2 (fn ...)}
not (fn [...] {:k val :k2 val})
thank you for the clarification, I try :field-labels (constantly "label")
without success, so it should be :field-labels {:k (constantly "label")}
It does not need to be a function...it can just be a string. Look at what
?!
does.
On Sun, Oct 13, 2024 at 6:51 PM Lin ZiHao @.***> wrote:
thank you for the clarification, I try :field-labels (constantly "label") without success, so it should be :field-labels {:k (constantly "label")}
— Reply to this email directly, view it on GitHub https://github.com/fulcrologic/fulcro-rad/issues/129#issuecomment-2409671489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI7L66JEQ2OSNSEHXFHWHDZ3MPRHAVCNFSM6AAAAABPW76772VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZGY3TCNBYHE . You are receiving this because you modified the open/close state.Message ID: @.***>
https://github.com/fulcrologic/fulcro-rad/blob/1f08ec89e04249b7fba8307c067b6955162828ee/src/main/com/fulcrologic/rad/form.cljc#L1752C1-L1773C18
docstring says
but
(get-in options [::field-labels k])
only handle field-labels as a map