-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Question] How to filter dropdown result #628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
you can provide filterFn := func(sql *db.SQL) *db.SQL {
return sql.Where("columnName", "=", "A")
}
formList.AddField("Nermo", "sb_nrhdr", db.Varchar, form.SelectSingle).
FieldOptionsFromTable("m_nermo", "nr_nrhdr", "nr_nrhdr", filterFn).FieldNotAllowEdit().
FieldInputWidth(3) |
Sorry, its not working, got erros what I want to know how to get the result from first select and use the result as a compare field in second select:
look at "sb_nrhdr" , first select as a result, and I want to use this result in second select, but its not working |
I encountered the same problem. |
Description [describe your questions]
RIght now, the result of dropdown are all the column in table, so how to get with filter, such as only key value or wanted field.
Now: Sample
Table X
column 1 column 2
A 111
A 222
B 333
B 444
question: how to get only show in dropdown are A values....111, 222,
Example code [If you have any code info]
Others [screenshots or other info]
The text was updated successfully, but these errors were encountered: