I am using 2 formsets on a template form and it shows fine but I don't
know how to implement the form validation. Not allow a field to be
empty.
I have tried the basic method as documented but it doesn't trigger any
messages.
However, I also haven't put any defined errors anywhere so I don't
know h
Never mind - I changed it to ModelForm class instead.
>From what I have read, FormSet is not designed to be used in the
generic form way.
Rather for bulk adds or something like that.
ModelForm works nice and easy.
On Dec 21, 7:04 am, Michael Thamm wrote:
> I am using 2 formsets on a te
Hi,
I am using 2 model forms and when I save the I get a save error since
the foreign key field can't be blank.
I try to add the new id at save, but it doesn't work.
This is the code for the save.
temp=shirtForm.save(commit=False)
userForm.shirt=temp.id
userForm.save()
Is
erForm.is_valid():
temp=shirtForm.save()
temp2=userForm.save(commit=False)
temp2.shirt=temp
shirtForm.save()
temp2.save()
return HttpResponseRedirect('/shirt/') # Redirect after
POST
On Dec 22, 10:49 pm, Michael Thamm wr
Hi,
I am using the jQuery stars on a radio field as a custom renderer. The
stars come up nicely but the
choice text still displays to the side of the stars.
How can I not show the choice text but still populate the field with
the choice result?
I am displaying the field in the template like this:
{
27, 6:39 am, Michael Thamm wrote:
> Hi,
> I am using the jQuery stars on a radio field as a custom renderer. The
> stars come up nicely but the
> choice text still displays to the side of the stars.
> How can I not show the choice text but still populate the field with
> the cho
t;)
> },
> });
> }
>
> The key to hiding the other form elements (like the labels) is the $
> ('#stars').children().not(":radio").hide() call, which basically hides
> everything but the actual stars. If the use doesn't have JS
7 matches
Mail list logo