samples https://django-formset.fly.dev/bootstrap/ #166
richard7III
started this conversation in
General
Replies: 2 comments 1 reply
-
This example https://django-formset.fly.dev/bootstrap/country uses the Selectize-widget. The code for the example can be found in /testapp/. django-formset adopts itself to the styling of the underlying framework. It pilfers the styles from the widgets to be replaced. In the above case this is the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Jacob!
Yes, I am using Selectize-widget:
lass BeneficiarydetailsForm(forms.Form):
default_renderer = FormRenderer(
form_css_classes='row',
field_css_classes={
'*': 'mb-2 col-12',
'currency': 'mb-2 col-4',
'beneficiary_nickname': 'mb-2 col-8'
},
)
#Beneficiary Nickname
beneficiary_nickname = CharField(label='Beneficiary nickname',
widget=TextInput(attrs={'placeholder': 'Beneficiary nickname'}))
#Beneficiary Country
beneficiary_country = ModelChoiceField(
queryset= Country.objects.all(),
label='Beneficiary Country',
widget=Selectize(
search_lookup='name__icontains',
placeholder="Select Country",
),
)
and in template:
<django-formset endpoint="{{ request.path }}" csrf-token="{{ csrf_token }}">
{% render_form form "bootstrap" %}
<div class="offset-sm-3">
<button type="button" df-click="submit -> proceed">Submit</button>
</div>
</django-formset>
, but the style does not affect SELECT part:
[image: image.png]
...even it does style TextInput widget..
What am I missing?
Cheers!
…On Tue, Sep 17, 2024 at 8:12 PM Jacob Rief ***@***.***> wrote:
This example https://django-formset.fly.dev/bootstrap/country uses the
Selectize-widget. The code for the example can be found in /testapp/.
django-formset adopts itself to the styling of the underlying framework.
It pilfers the styles from the widgets to be replaced. In the above case
this is the <select>…</select>-widget.
—
Reply to this email directly, view it on GitHub
<#166 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZ3Z3TJICINM7TMSUORFEDZXBWH7AVCNFSM6AAAAABOLQXWQWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANRXGM3TCMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for a great package!
While having already used in a project, still struggle with styling. Particularly with Select field.
Can you please somebody point me to source code for samples https://django-formset.fly.dev/bootstrap/ ?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions