Skip to content
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

Add preview/published version of fields #40

Closed
miguelgrc opened this issue May 23, 2024 · 0 comments · Fixed by #55
Closed

Add preview/published version of fields #40

miguelgrc opened this issue May 23, 2024 · 0 comments · Fixed by #55
Assignees
Labels
enhancement New feature or request

Comments

@miguelgrc
Copy link
Collaborator

miguelgrc commented May 23, 2024

Right now we don't have a way to preview the published/saved forms' data without displaying it inside of the corresponding fields set as readonly. We need to add a way to display for example the content of a text field as pure text instead of a filled-in text field, or a URL as an actual hyperlink instead of an url field.

A way of implementing this would be to have alternative "preview" implementations of those fields in alternative fields/index.js and widgets/index.js and to pass those to the RJSF form in Form.jsx instead of the normal implementations when a isPreview or isPublished (tbd) property is present. For users we could either add and expose a new FormulePreviewForm to be used when they want to render the form in this fashion, or alternatively add some isPreview prop to be passed directly to FormuleForm (by default it should show the published version).

Would be needed at least for Text, TextArea, Url, RichEditor and Latex.

@miguelgrc miguelgrc added the enhancement New feature or request label May 23, 2024
@miguelgrc miguelgrc self-assigned this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant