-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Form Inputs Fields #6875
Comments
@MichaelHarmsTIB ckan/ckan/logic/action/create.py Line 178 in 91c9366
I think that Thanks ps correct me if I've missed something @amercader @tino097 |
There is no table user_extra, so I have a problem so extend a form in the way I did it for a dataset. |
We don't have an easy way to extend the user form yet #6070, but some of the underlying work was done by @amercader to support storing values and can be used to extend the form with a bit of extra effort #5382 |
@TomeCirun maybe not the same issue but slightly relevant, having a custom scheming Select field that have "others" as an option, once selected it shows a text input that takes data from user, once there is a submit, if you logged the data it shows the custom field value, but if logged the result of package_create action or package_update action from the same data the custom field value isn't their, however it's stored in the database as {"__extras":"field_name":"field_value"}, but when retrieving it won't show it up , i've noticed if the context is logged for package create and update, it shows "plugin_extras=None", please refer to these shots for more reference: if i tried to log the submitted data, i can still see the field is there: this is the field value showing in the database: but the result of package_create of package_update actions won'e show the custom field data: thank you for any help, i've actually had a similar question of stackoverflow but no one responded, saw this as oportunity for a similar issue, |
CKAN version
2.9.3
Describe the bug
I follow this documentation:
https://docs.ckan.org/en/2.9/contributing/frontend/templating.html#form-macros
My code:
{% import "macros/form.html" as form %}
{{ form.input("email", id="field-email", label=("Email"), type="email", placeholder=("joe@example.com"), value=data.email, error=errors.email, classes=["control-medium"], is_required=True) }}
{{ form.checkbox('agree_license', label=_(" Ich akzeptiere die Nutzungsbedingungen des Forschungsdatenrepositoriums des FID move."), id='field-agree_license', checked=false, is_required=True) }}
The E-Mail input field is a original code raw from new_user_form.html and is_required doesn't work nor my own field {{ form.checkbox ..
Expected behavior
If is_required=true and checkbox or input field is empty, the form doesn't submit.
So what is exactly to do?
Additional details
Please could someone write for the documentation more examples.
The text was updated successfully, but these errors were encountered: