[ic] multivalue inputs and mv_data_filter_(field)

Michael Neilly mneilly at yahoo.com
Mon Jan 19 15:46:52 EST 2004


I have a form in which I assign multiple values to a single
name, category. If I access these values via the cgi tag with
filter= then I get the result I expect (the filter replaces
nonword sequences with commas).

I want to concatenate the multiple values using the filter
mentioned above and have the single filtered value placed
in the database's category field. Instead, what I'm getting
is a row per value in my database.

If I change the filter to do something such as capitalize 
I can see that each new row has been filtered/capitalized.
So it seems that I don't understand how mv_data_function
treats the null characters between values or how to change
that behaviour.

Is there a way to filter such that the insert below does
not create a new row for each value of category?
 

  <form method=post action="[process]">

    <input type=hidden name="mv_data_table"    value="test">
    <input type=hidden name="mv_data_key"      value="code">
    <input type=hidden name="mv_data_function" value="insert">
    <input type=hidden name="mv_nextpage"      value="showall">
    <input type=hidden name="mv_data_fields"   value="code,category">

    <input type=hidden name="mv_data_filter_category"
value="nonword_to_comma">

    <input type=checkbox name=category value=cat1>Category 1<br>
    <input type=checkbox name=category value=cat2>Category 2<br>
    <input type=checkbox name=category value=cat3>Category 3<br>
    <input type=checkbox name=category value=cat4>Category 4<br>

    <input type=hidden name="mv_todo" value="set">
    <input type=submit name="Submit" value="Submit">

  </form>

thanks in advance!
-M



More information about the interchange-users mailing list