[ic] name and e-mail save to userdb still wont work

Julia Jacobs interchange-users@interchange.redhat.com
Fri Mar 8 10:54:00 2002


I've been busting a** trying to get this lousy little form to work which I
posted earlier on the list.  noting Ed L. former suggestion:

One: your [set Save_database] will only call [userdb save] if mv_todo is
not equal to 'submit'.  Your submit button sets mv_todo to 'submit'.  Looks
like that could be a problem which might cause [userdb save] to never be
invoked.  I would remove [if cgi mv_todo ne submit] and the corresponding
closing [/if] and give it a try.

- Ed L.

I changed the      [set Save_database]
          [if cgi mv_todo em submit]
              [calc] Log("Saving userdb in mv_check.")[/calc]
                  [userdb save]
          [/if]
      [/set]
a million different ways, removed different components of it, gone over the
ictags.pdf looking for clues, but to no avail.  This form, BTW is parts of
the checkout.html form and the some lines from another form posted on the
list which can be found on the CVS repository under
interchange/dist/simple/pages/feedback.html
Can someone find it in their hearts to help me make a little form for folks
to enter their name and email address and click on a mailing list subject
which will all be saved to the userdb when they click on a button?  I would
be ever so grateful!  Then Ton can finally get some feedback for his
questions! 

So this is what I have which does not work worth a hill of beans:

<!-- BEGIN COMPONENT [control component emaillist] -->
[comment]
ui_component: emaillist
ui_component_type: vertical, content
ui_component_group: promotion
ui_component_label: E Mail List Sign-Up Box

[/comment]

<SCRIPT>    // JavaScript Form Validation Demo    // by Paul Colton
        // Make sure the email field is not blank
        ch = ch.toUpperCase();
    }
    </SCRIPT>

<FORM ACTION="[process secure=1]" METHOD="POST" name=emaillist>
    <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
    <INPUT TYPE=hidden NAME=mv_nextpage VALUE="thankyou2">
    <INPUT TYPE=hidden NAME=mv_doit VALUE=refresh>
    <INPUT TYPE=hidden NAME=mv_check    VALUE="Save_database">
    
     [set Save_database]
          [if cgi mv_todo em submit]
              [calc] Log("Saving userdb in mv_check.")[/calc]
                  [userdb save]
          [/if]
      [/set]
    
    <table border="0" bgcolor="cornsilk" width="201" height="250">
  <tr> 
    <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Enter
your name and email address to recieve more information:</b></font></td>
  
  <tr> 
    <td align=left class="contentbar1"> [error name=fname std_label="First
Name" required=1]<br>
      <input type=text name=fname value="[value fname]" size="20"
maxlength="20">
    </td>
  </tr>
  <tr> 
    <td align="left" class="contentbar1">[error name=lname std_label="Last
Name" required=1]<br>
      <input type=text name=lname value="[value lname]" size="20">
    </td>
  </tr>
  <tr> 
    <td align="left" class="contentbar1"> [error name=email std_label="Email
Address" required=1]
      <input type=text name=email value="[value email]" size="30">
    </td>
  </tr>
  <tr> 
    <td align="left" valign="middle" class="contentbar1"><b><font
face="Verdana, Arial, Helvetica, sans-serif" size="2">Mail
      lists</font></b><br>
      [perl tables="__UI_META_TABLE__ mv_metadata"] return; [/perl]
[input-filter 
      name=mail_list op=null_to_space][/input-filter] [display table=userdb
type=multiple 
      column=mail_list key="[data session username]"]
      <br>
    [button 
        name="mv_click"
        src="buttonMail.gif"
        text="Mail"
        hidetext=1
        form=emaillist
        ]
        mv_todo=submit
    [/button]
    
    </td>
  </tr>
</table>

<!-- END COMPONENT [control component emaillist_vertical] -->

-- 
Julia Jacobs
Currant Media
407-977-4523
Fax 407-261-0176
http://www.currantmedia.com
Members of The Better Business Bureau
* Multimedia Producers
* Web Design & Development
* 2D/3D Graphics/Animation
* Hosting, domain and e-mail
* E-Commerce ­ check, credit card validation