question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom-select class disapear after wrapping in PrependedText

See original GitHub issue
  • Package version: 1.11.0
  • Django version: 3.0.5
  • Python version: 3.9.0
  • Template pack: bootstrap4

Description:

Generating custom layout, both ‘owner’ and ‘currency’ are selects

class AccountForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(AccountForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper(self)
        self.helper.form_show_labels = False
        self.helper.field_class = 'input-group-lg'

        # owner = PrependedText('owner', 'Owner:')
        currency = PrependedText('currency', 'Currency:')

        submit = Submit('submit', 'Submit')
        submit.field_classes = "btn btn-outline-dark btn-block btn-lg"

        self.helper.layout = Layout(

            'owner',
            currency,
            submit
        )

    class Meta:
        model = Account
        fields = ['owner', 'currency']

Generated HTML - no “custom-select” class for ‘currency’

<select name="owner" class="select form-control custom-select" id="id_owner"> 
        <option value="3" selected="">Name3</option>
       <option value="2">Name2</option>
</select>
<select name="currency" class="select form-control" id="id_currency">
   <option value="€" selected="">EUR</option>
   <option value="$">USD</option>
</select>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
iGoosiatincommented, Feb 21, 2021

Hi @iGoosiatin – Thanks again for the report. I’ve released version 1.11.1 which contains a fix for this. Do let us know if this doesn’t work for you!

Hi David,

Issue is fixed. Thanks you guys for suck a quick resolution!

0reactions
smithdc1commented, Feb 21, 2021

Hi @iGoosiatin – Thanks again for the report. I’ve released version 1.11.1 which contains a fix for this. Do let us know if this doesn’t work for you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix AppendedText, PrependedText and ... - GitHub
Fix AppendedText, PrependedText and PrependedAppendedText for fields that are not ... custom-select class disapear after wrapping in PrependedText #1111.
Read more >
wrapping text disappearing after giving overflow hidden
I used overflow: "hidden" in the class right_box. wrapping text got fixed. but when i decrease the screen size I am seeing some...
Read more >
laravel certification Flashcards - Quizlet
The Laravel service container is a powerful tool for managing class dependencies and performing dependency injection: class dependencies are "injected" into the ...
Read more >
Question: Field selection and error handling in a batch loader?
This issue has been created since 2019-09-23. ... custom-select class disapear after wrapping in PrependedText, 10, 2021-02-10, 2022-11-18.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found