[ic] [display] state_select value problem - More info

Gert van der Spoel gert at 3edge.com
Sat Dec 26 19:00:19 UTC 2009


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Rick Bragg
> Sent: Saturday, December 26, 2009 8:19 PM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] [display] state_select value problem - More info
> 
> On Sat, 2009-12-26 at 16:44 +0200, Gert van der Spoel wrote:
> > > -----Original Message-----
> > > From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> > > users-bounces at icdevgroup.org] On Behalf Of Rick Bragg
> > > Sent: Saturday, December 26, 2009 4:30 PM
> > > To: interchange-users at icdevgroup.org
> > > Subject: Re: [ic] [display] state_select value problem - More info
> > >
> > > On Sat, 2009-12-26 at 15:08 +0200, Gert van der Spoel wrote:
> > > > > -----Original Message-----
> > > > > From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-
> > > > > users-bounces at icdevgroup.org] On Behalf Of Rick Bragg
> > > > > Sent: Friday, December 25, 2009 10:48 PM
> > > > > To: interchange-users at icdevgroup.org
> > > > > Subject: Re: [ic] [display] state_select value problem - More
> info
> > > > >
> > > > > On Fri, 2009-12-25 at 15:25 -0500, Rick Bragg wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Happy holidays to all.
> > > > > >
> > > > > > I am having an issue with getting the value back from a
> > > state_select
> > > > > > display:
> > > > > >
> > > > > > I have the display following in a form:
> > > > > >
> > > > > >   [display name=test_state type=state_select value="[value
> > > > > test_state]"]
> > > > > >
> > > > > > however, when I submit that, the value for [value test_state]
> is
> > > > > empty.
> > > > > >
> > > > > > How do I use the state_select display to set a value in
> something
> > > > > like
> > > > > > [value test_state]?
> > > > > >
> > > > > > Thanks
> > > > > > Rick
> > > > >
> > > > > More info:
> > > > >
> > > > > Also, below that I have the country select as follows:
> > > > >
> > > > >   [display name=test_country type=country_select value="[value
> > > > > test_country]"]
> > > > >
> > > > > The value for [value test_country] returns whatever country I
> > > select
> > > > > perfectly, and when I change it on the form, the state_select
> > > > > selections
> > > > > also update perfectly.  i.e. when I change from US to CA, the
> > > Canada
> > > > > provinces are displayed in the state_select select list, but I
> > > never
> > > > > get
> > > > > a value in [value test_state].
> > > >
> > > > For my understanding, if you go to
> > > http://demo.icdevgroup.org/i/demo1/
> > > > and put something in your basket and go for Express Checkout.
> > > >
> > > > Then pick a State/Province and press 'Place Order' ...
> > > >
> > > > The form will reload with missing fields.
> > > >
> > > > Does it fill out State/Province to the one you choose?
> > > >
> > > > ---
> > > > If no:  hmmmm strange
> > > > If yes: does this behavior happen on your install?
> > > >
> > > > If no: hmmmm strange
> > > > If yes: looks like there is a value?
> > > >
> > > > CU,
> > > >
> > > > Gert
> > > >
> > >
> > >
> > > Yes, when I use the checkout [value state] is gets updated
> correctly to
> > > the order.  I'm trying to use it in a different form (not checkout)
> > > It seems:
> > >   [display name=test_state type=state_select value="[value
> > > test_state]"]
> > > does not work, (nothing ever gets updated in [value test_state])
> > > However:
> > >   [display name=test_country type=country_select value="[value
> > > test_country]"] works perfect.
> > > Also:
> > > [display name=state type=state_select value="[value state]"]  works
> > > perfect too...  I just can't seem to make it save to a value other
> than
> > > "state"...
> >
> > If I get the code correctly (code/Widget/country_select.widget
> contains the
> > state_select), it does:
> >         if(! $sel) {
> >                 my $n = $opt->{name};
> >                 my $pre = '';
> >                 if($n =~ /^([a-z]_)/) {
> >                         $pre = $1;
> >                 }
> >                 $sel = "${pre}state_widget_container";
> >         }
> >
> > >From the looks of it makes $sel either state_widget_container  (with
> field
> > 'state')  or ${pre}state_widget_container, which for example would
> make
> > b_state  work ... My guess is that  a_state, t_state, x_state will
> work but
> > anything else such as aa_state, or test_state or xxxxstate  for that
> matter,
> > will not work.
> >
> > CU,
> >
> > Gert
> >
> 
> Hmm, that looks right, but testing with s_state broke the display
> altogether.  (the select box didn't even show up)  However, b_state
> works perfectly.  With sv_state, the select box shows, but does not
> update the value.  also, sstate will display the selector, but not
> update the value...  Seems that only [value state] and [value b_state]
> are the only values you can use that will update the values.

Have you tried something like this:
 [display name=t_state type=state_select value="[evalue t_state]"]
 [display name=test_country type=country_select state_var=t_state
value="[evalue test_country]"]

Or else:
 [display name=t_state type=state_select value="[evalue t_state]"]
 [display name=t_country type=country_select value="[evalue t_country]"]

CU,

Gert





More information about the interchange-users mailing list