FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you combine fields?
#1
Exclamation 
You have 2 fields for a phone number one field holds the area code and another field holds the number. Now you go to print your form and you want both of those fields to print together on one line combining the area code with the number only seperated by a - is this possible or something like it?

Example:

This is what it looks like now:

Phone area code: 999
Phone number: 999-9999

I want it to come together like this:

Full phone number: 999-999-9999


Thanks!
Reply
#2
Hello Seawind,
You have not mentioned about any programming language.
And R u printing data direct from the form or first stored in the database?
Give some idea so that one can help you.
Reply
#3
I apologize, it is a multipage form created with the API. So yes it is stored in the database before being printed.

Currently where it says html / printer-friendly I select One submission per page and display to print the form.

Here is one of the pages:

Code:
<form action="/pages/form.php" method="post">
<input type="hidden" name="submit_button_name_attribute" value="1" />
<fieldset>  
<legend>Quick Apply<br /> <br />
</legend><ul><li>
  <label for="first_name">First Name:</label>
  <input name="first_name" type="text" class="text" id="first_name" size="20" />  
  </li>
  <li>
  <label for="last_name">Last Name:</label>
  <input name="last_name" type="text" class="text" id="last_name" size="20" />
  </li>
  <li>
  <label>Home Phone:</label>
  <input type="text" name="home_phone_area_code" class="text" id="home_area_code" size="1" maxlength="3" />
  -    
  <input type="text" name="home_phone_number" class="text" id="home_number" size="11" />  
  </li>
  <li>
  <label>Cell Phone:</label>
  <input type="text" name="cell_phone_area_code" class="text" id="cell_area_code" size="1" maxlength="3" />
  -
  <input type="text" name="cell_phone_number" class="text" id="cell_number" size="11" />
  </li>
  <li>
  <label for="email_address">Email Address:</label>  
  <input name="email_address" type="text" class="text" id="email_address" size="20" />
  </li>
  <li>
  <label for="address">Address:</label>  
  <input name="address" type="text" class="text" id="address" size="20" />
  </li>
  <li>
  <label for="city">City:</label>  
  <input name="city" type="text" class="text" id="city" size="20" />
  </li>
  <li>
  <label>State / Zip:</label>
  <input name="state" type="text" class="text" id="state" size="6" />
  <span class="formtext">/</span>
  <input name="zip" type="text" class="text" id="zip" size="6" />  
  </li>
  <li>
<div class="submit"><input type="image" value="submit" src="/images/submit.gif" onclick="history.go(1)" /></div>
</fieldset>  
</form>

Any ideas?
Reply
#4
(Jan 22nd, 2010, 8:34 PM)seawind Wrote: You have 2 fields for a phone number one field holds the area code and another field holds the number. Now you go to print your form and you want both of those fields to print together on one line combining the area code with the number only seperated by a - is this possible or something like it?

Example:

This is what it looks like now:

Phone area code: 999
Phone number: 999-9999

I want it to come together like this:

Full phone number: 999-999-9999


Thanks!

Hi,

I think the submission pre-parser might help you with this.

http://modules.formtools.org/submission_pre_parser/
Reply
#5
Hello Seawind,
As you shows your code it is in HTML. So its no concern with masking the text field.
So for your desired output you have to work on your database.
You have to create one query for your desired output.
Try once or I will send you the query structure.
Reply
#6
Awesome, got it working with the submission pre parser! Thanks for the help guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)