Try this out:
class SortFieldsForm(forms.Form):
LatestyearModel=forms.BooleanField(label="latest year")
LowestPrice=forms.BooleanField(label="lowest price")
HighestPrice=forms.BooleanField(label="highest price")
Newest_Entry=forms.BooleanField(label="latest date")
def __init__(self, *args, **kwargs):
self.helper = FormHelper()
self.helper.form_id = 'id-exampleForm'
self.helper.form_class = 'form-inline'
self.helper.form_method = 'post'
self.helper.form_action = 'sort_posting'
#self.helper.add_input(Submit('submit', 'Submit'))
super(SortFieldsForm, self).__init__(*args, **kwargs)
self.helper.layout = Layout(
'LowestPrice',
'HighestPrice',
'Newest_Entry',
'LatestyearModel' ,
ButtonHolder(
Submit('submit', 'Submit', css_class='button white')
)
)