Form Field Name Length

Results 1 to 2 of 2

Thread: Form Field Name Length

  1. #1
    Join Date
    Dec 1969

    Default Form Field Name Length

    Hi,<BR><BR>I&#039;m using the following piece of code to generate a mail body for an e-mail from a form:<BR><BR>For ix = 1 to Request.Form.Count<BR>fieldName = Request.Form.Key(ix)<BR>fieldValue = Request.Form.Item(ix)<BR>strspace = 40 - len(fieldName)<BR>mailbody = mailbody + fieldname & string(strspace," ") & fieldvalue & vbcrlf<BR>Next<BR><BR>For presentation, I insert a number of whitespace characters between the field name and the field value. This is done by deducting the length of the field name from 40, which is just a value I selected.<BR><BR>What I&#039;d like to do is establish the maximum length of a field name and to use this value to calculate the required amound of whitespace, rather than 40.<BR><BR>Any ideas?<BR><BR>Martin

  2. #2
    Join Date
    Dec 1969

    Default RE: Form Field Name Length

    You might want to try to add that information in your form as hidden fields...<BR><BR>For ix = 1 to Request.Form.Count<BR>fieldName = Request.Form.Key(ix)<BR>fieldName_length = Request.Form(fieldName&"_LENGTH")<BR>fieldValue = Request.Form.Item(ix)<BR>strspace = fieldName_length - len(fieldName)<BR>..........<BR>next<BR><BR>You need to setup the values on your form so the values are passed correctly.....<BR><BR>Paulee<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts