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

JSONFieldWidget attrs #166

Open
hdeng88 opened this issue May 13, 2024 · 1 comment
Open

JSONFieldWidget attrs #166

hdeng88 opened this issue May 13, 2024 · 1 comment

Comments

@hdeng88
Copy link

hdeng88 commented May 13, 2024

Screenshot 2024-05-13 at 15 06 41

Trying to make the JSONField input box wider, but attrs does not seem to work.
Could you please provide a template for JSONFormWidget attrs settings?

"JSONFormWidget
classJSONFormWidget(schema, model_name='', file_handler='', validate_on_submit=False**, attrs=None)"**

I tried in forms.py:

'person_all_names': JSONFormWidget(schema=PersonModel.name_SCHEMA,attrs={'style': 'width: 300%; height: 100%;'}),

but did not work...

Maybe the JSONFormWidget does not take in attrs -- 'style'?

@hdeng88
Copy link
Author

hdeng88 commented May 13, 2024

I found out the issue but no solution:

the attrs does work but only on the class of widget container.

Suggest to add a width/height parameter. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant