Author Topic: BURNING QUESTION field  (Read 2230 times)

dxmecca

  • Posts: 18
    • View Profile
BURNING QUESTION field
« on: August 09, 2006, 05:50:26 am »
I am trying to use LMP to gather Burning Question info from my members.

I've seen some code, but it wasn't clear as to where/how to place it. I've tried and tried over and over but no combination seems to work.  Also wanted to change the text in the subscribe button but am uncertain as to whether that will create a problem with LMP working correctly.

Here's my html code.  Please tell me where and how to place a "textarea" field approximately 5 lines deep and 25 characters wide.

Thanks,
Dennis


<form method=post action=http://www.example.com/listmail/signup.php>
<input type=hidden name=list value=1>
First Name: <input type=text name=fname size=10><br>
Email: <input type=text name=email><br>
My Burning Question is: <input type=text name=user1><br>
<input type=submit name=sup value="Subscribe Me!">
</form>

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
BURNING QUESTION field
« Reply #1 on: August 09, 2006, 10:24:10 am »
Hi Dennis,

I have edited your post to remove your domain name and ListMail folder for your protection.

You can change the text in the submit button - it won't affect how ListMail operates.  Minimum signup.php form post requirements are values for the list and email variables.  For more details on signup forms please view the online help on the subject.

A textarea field is added as follows, assuming you are replacing Custom Field #1 (user1) to allow the user to enter a longer "Burning question".
Code: [Select]
<textarea name=user1 rows=5 cols=80></textarea><br>
One serious problem with using a textarea as a custom field is that you cannot currently edit multi-line custom field data.  All of the custom field value appear on users' Edit pages in a single line "INPUT" element.  Therefore, when you save a user who has entered a multi-line question some of their data could be lost.

Until I revamp custom fields to allow you to define multiple types, the best workaround could be to add some JavaScript to your form to actually REMOVE the line breaks and replace them with spaces.  Something like this might work:
Code: [Select]
<script language="javascript"><!--
function filterLineBreaks (ta) {
  ta.value = ta.value.replace(/\r\n|\r|\n/g, ' ');
}
--></script>
<form method=post action=http://www.example.com/listmail/signup.php onSubmit="filterLineBreaks(this.user1); return true;">
<input type=hidden name=list value=1>
First Name: <input type=text name=fname size=10><br>
Email: <input type=text name=email><br>
My Burning Question is: <textarea name=user1 rows=5 cols=80></textarea><br>
<input type=submit name=sup value="Subscribe Me!">
</form>

I used this web page as a reference. :)

Hope that helps!
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting