[ic] Updating Database using form - Select Multiple

Mike Heins interchange-users@interchange.redhat.com
Wed Feb 6 16:21:01 2002


Quoting Mathew Jones (mat@booksellersolutions.com):
> Mike Heins wrote
> 
> > If you have the UI in, or include lib/UI/profiles/process_filter, you can
> > put in:
> > 
> >     <INPUT TYPE=HIDDEN NAME="ui_filter:m_pets" VALUE="null_to_comma">
> > 
> 
> 
> Mike,
> 
> 
>  I removed the commas in the values. I added the code above, my new code is below.
> 
> This still only writes the first selected value. My page resides in the 
> catalog/pages dir, and not in the UI. Does this make a difference? If so 
> how can I call the 'process_filter' from a page thats not in UI?
> 
> <FORM METHOD=POST ACTION="[process]">
> <INPUT TYPE=HIDDEN NAME="mv_data_table" VALUE="members_sf">
> <INPUT TYPE=HIDDEN NAME="mv_data_key" VALUE="m_code">
> <INPUT TYPE=HIDDEN NAME="mv_data_function" VALUE="update">
> <INPUT TYPE=HIDDEN NAME="mv_nextpage" VALUE="profileedit">
> <INPUT TYPE=HIDDEN NAME="mv_update_empty" VALUE="1">
> <INPUT TYPE=HIDDEN NAME="mv_data_fields" VALUE="m_code,m_pets">
> <select name="m_pets" MULTIPLE>
> <option value="Dog">Dog
> <option value="Cat">Cat
> <option value="Rabbit">Rabbit
> </select>
> <INPUT TYPE=HIDDEN NAME="ui_filter:m_pets" VALUE="null_to_comma">
> <input type=submit>
> </form>
> 
> 

Oops. You need to enable the filter....

    <input type=hidden name=mv_click value=process_filter>

I have put in an mv_data_prep_* thing in the devel version,
but process_filter does quite a bit more than just this so
I am not sure I will keep it.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Experience is what allows you to recognize a mistake the second
time you make it. -- unknown