-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: fill form by query params #5330
Conversation
ref: nocodb#1371 ref: 2862 Work In Progress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Prefer the following layout. Since users cannot construct the query param on UI, next to Pre-filled Fields, we may need an indicator / tooltip to show the details (e.g. what are those 4 options / how to construct the query params / what column types are currently supported etc). Ideally it should be a link to the documentation.
- So far it looks good. Please proceed to add i18n to
en.json
- Not working in survey mode
- Run
npm run lint
onnc-gui
after all the changes.
packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue
Outdated
Show resolved
Hide resolved
packages/nc-gui/pages/[projectType]/form/[viewId]/index/index.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- verified except for LinkToAnotherRecord; we can defer pre-filling of links in the first iteration.
- [to be discussed; low priority] constructing URL is currently manual process. we can evaluate to add Generate pre-filled URL button. One can configure statically pre-filled value fields in form view & generate link. This button can be part of shared view modal.
fix: BelongsTo needs a single object while HasMany & ManyToMany neen an array fix: read private key and label fields from column meta
it would take quite a refactoring to support pre-filled fields in survey mode, skipping for the initial release
This is finalized from my end. To sum up:
I want to thank @wingkwong for all his help and of course the rest of you for your inputs. |
Please resolve the conflicting files. |
Will review again after the next release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like form field for select fields (single select and multi select) is broken after rebase. I tried it out with following configuration, meta db project. Was unable to input select fields from shared form.
Node: v16.14.0
Arch: arm64
Platform: darwin
Docker: false
RootDB: sqlite3
PackageVersion: 0.109.1
I will continue to test this feature further & will capture additional here as and when I find.
@rallisf1 Can you help rebase this PR to latest develop? |
Kinda swamped this week but I'll try. |
@rallisf1 thanks for this PR. as this was old, we prepared a separate PR based out of your proposal here & merged into develop. |
Gee thanks! I never got to updating this as you were refactoring a bit too fast for me to catch up. |
ref: #1371
closes: #2862
Work In ProgressChange Summary
Added Prefill mode select in Form Share View with 4 options:
Note: My use-case didn't require per field options so the options above work for all the fields in the form
WIP:
probably more virtual fieldsbut it doesn't populate the value list. I'd appreciate someone to step in on thisi18n, will do once this is finalized and acceptedHow to use
Add
&fieldname=value
in the query params of the form url. Spaces and special characters work as expected in modern browsers (they handle the URL parsing). Special fields:only accepts ISO format
must be in milliseconds
| splits id from title and ; splits multiple values
Change type
Test/ Verification
Provide summary of changes.
Additional information / screenshots (optional)