Hi Daniel,
It worked.
Thanks a lot :)
On Tuesday, August 5, 2014 7:08:34 PM UTC+5:30, Daniel Roseman wrote:
>
> On Tuesday, 5 August 2014 13:28:28 UTC+1, VIPUL BANSAL wrote:
>>
>> Hi,
>>
>> I trying to create a drop-down which gets repopulated every time we land
>> on the page.
>>
>> If I use th
On Tuesday, 5 August 2014 13:28:28 UTC+1, VIPUL BANSAL wrote:
>
> Hi,
>
> I trying to create a drop-down which gets repopulated every time we land
> on the page.
>
> If I use the following code everything works correctly:
>
> class DeleteMappingForm(forms.Form) :
> subAreaDropDown = forms.Choi
Hi,
I trying to create a drop-down which gets repopulated every time we land on
the page.
If I use the following code everything works correctly:
class DeleteMappingForm(forms.Form) :
subAreaDropDown = forms.ChoiceField(choices = fetchChoices())
def deleteMapping(request):
form = D
On Mon, Mar 25, 2013 at 4:54 PM, Dilip M wrote:
> Hi,
>
> I am trying to fill in *choices *for MultipleChoiceField in runtime. I
> am using formWizard and trying to return the dictionary using get_form_kwargs.
>
>
> I am able set the *initial* for CharField but not *choices *for
> MultipleChoic
Hi,
I am trying to fill in *choices *for MultipleChoiceField in runtime. I am
using formWizard and trying to return the dictionary using get_form_kwargs.
I am able set the *initial* for CharField but not *choices *for
MultipleChoiceField.
I am trying to show up dynamic choices based on the user'
On May 18, 3:32 pm, Simon Greenwood wrote:
> On May 18, 12:02 pm, Simon Greenwood wrote:
>
>
>
> > On May 15, 5:58 pm, simong wrote:
>
> > > There's probably a very simple answer to this but I can't see it at
> > > the moment:
>
> > > This model:
>
> > > class Product(models.Model):
> > >
On May 18, 12:02 pm, Simon Greenwood wrote:
> On May 15, 5:58 pm, simong wrote:
>
>
>
> > There's probably a very simple answer to this but I can't see it at
> > the moment:
>
> > This model:
>
> > class Product(models.Model):
> > user = models.ForeignKey(User, related_name="product_li
On May 15, 5:58 pm, simong wrote:
> There's probably a very simple answer to this but I can't see it at
> the moment:
>
> This model:
>
> class Product(models.Model):
> user = models.ForeignKey(User, related_name="product_list",
> editable=False)
> productid = models.CharField(m
There's probably a very simple answer to this but I can't see it at
the moment:
This model:
class Product(models.Model):
user = models.ForeignKey(User, related_name="product_list",
editable=False)
productid = models.CharField(max_length=40, blank=True)
prodname = models.C
pk,
thank you very much for your hint, now everything works ok.
:-)
On 9 Dic, 18:41, pk <[EMAIL PROTECTED]> wrote:
> This is a pretty common problem. Each form object gets instantiated as
> you need them.
> So in your POST handling, you need to instantiate the form with the
> same product field
This is a pretty common problem. Each form object gets instantiated as
you need them.
So in your POST handling, you need to instantiate the form with the
same product field
so that it can populate the choice field setting correct. i.e.
FormForOptionQuantity(product,request)
P.K.
On Dec 9, 7:31
On Dec 9, 2007 7:31 AM, pinco <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm trying to populate dynamically at runtime a choicefield and
> subsequently validate the user choice, but without results.
> The goal is to permit the user, in an e-commerce application, to
> choose the number of products to b
Hi,
I'm trying to populate dynamically at runtime a choicefield and
subsequently validate the user choice, but without results.
The goal is to permit the user, in an e-commerce application, to
choose the number of products to buy through a choicefield, with a
list of integer from 1 to a maximum n
> Newforms has a spiffy way to dynamically set the "initial" values of
> fields, in the view code when the Form is constructed.
> choosecolorform = ChooseColorForm(initial={'color': 'black'})
>
> I was hoping it would be just as easy to dynamically define the
> choices available in a ChoiceField
Am Freitag, 3. August 2007 00:19 schrieb rskm1:
> Newforms has a spiffy way to dynamically set the "initial" values of
> fields, in the view code when the Form is constructed.
> choosecolorform = ChooseColorForm(initial={'color': 'black'})
I think you only can set initial to a value, not to a d
Newforms has a spiffy way to dynamically set the "initial" values of
fields, in the view code when the Form is constructed.
choosecolorform = ChooseColorForm(initial={'color': 'black'})
I was hoping it would be just as easy to dynamically define the
choices available in a ChoiceField, too... bu
* Rubic wrote, On 14.01.2007 18:19:
I've been using newforms for a few days now and just
ran across something in ChoiceField that might be worth
sharing.
However, sometimes you'd like the choice list to
be dynamic, to reflect the current values in the
model. My approach is to create a class
I just read Honza Král's post where he describes handling this in
__init__:
http://tinyurl.com/ync6y9
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to t
I've been using newforms for a few days now and just
ran across something in ChoiceField that might be worth
sharing.
The most common use case for a choice field is to
pass a static list of choices. In the example
below, it's a list of flavor choices:
model.py:
class Flavor(models.Model):
19 matches
Mail list logo