One Bootstrap Modal affects the other - bootstrap-modal

I have two bootstrap modals on a page. The first one (Modal_Add) will not work except if the second one (Modal_Edit) is first opened. The text boxes will not be clickable and nothing can be typed. But when I open the second one - without doing anything on it - and close, then open the first that was not working, it works. below are the codes
<!-- MODAL ADD -->
<form id="add_form" enctype="multipart/form-data">
<div class="modal fade" id="myModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabelA" aria-hidden="true">
<div class="modal-dialog" >
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h5 class="modal-title" id="exampleModalLabelB">Add New Member</h5>
</div>
<div class="modal-body">
<div class="container-fluid">
<input type="hidden" name="member_units" id="member_units" value="<?php if (isset($units_code)){echo $units_code;}?>" class="form-control">
<div class="row-fluid">
<div class="span6">
<div class="col-md-8">
<label class="col-form-label">Entrance Fee</label>
</div>
</div>
<div class="span6">
<div class="col-md-8">
<input type="text" name="entrance_amount" id="entrance_amount" class="form-control" placeholder="Entrance Fee">
<span id="entrance_amount_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Member Name</label>
<div class="col-md-8">
<input type="text" name="member_name" id="member_name" class="form-control" placeholder="Name"> <span id="member_name_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Address</label>
<div class="col-md-8">
<input type="text" name="member_address" id="member_address" class="form-control" placeholder="Address">
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Member Phone</label>
<div class="col-md-8">
<input type="text" maxlength="11" name="member_phone" id="member_phone" class="form-control" placeholder="Phone">
<span id="member_phone_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Gender Status</label>
<div class="col-md-8">
<select name="gender_status" id="gender_status" class="form-control tooltips" data-trigger="hover" data-original-title="choose a Gender Status" >
<option value="0">--select--</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="company">Company</option>
<option value="society">Society</option>
</select>
<span id="gender_status_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Banker</label>
<div class="col-md-8">
<input type="text" name="banker" id="banker" class="form-control" placeholder="Banker">
<span id="banker_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Account Number</label>
<div class="col-md-8">
<input type="text" name="accountno" id="accountno" class="form-control" placeholder="Account Number" maxlength="10">
<span id="accountno_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label" id="g-label">Guarantors</label>
<div class="col-md-8">
<select data-placeholder="Type Guarantors" name="guarantors[]" id="guarantors" class="chosen" multiple="multiple">
<!-- <option value="0">A</option> -->
</select>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Means of ID</label>
<div class="col-md-8">
<input type="text" maxlength="11" name="id_means" id="id_means" class="form-control" placeholder="Type your NIN">
<span id="id_means_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Date Joined</label>
<div class="col-md-8">
<input type="date" name="date_joined" id="date_joined" class="form-control datepicker" value="<?php echo date('Y-m-d'); ?>">
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Upload Passport</label>
<div class="col-md-8">
<input type='file' name='userfile' size='20' />
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" id="btn_save" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
</form>
<!--END MODAL ADD-->
<!-- MODAL EDIT -->
<form id="edit_form" enctype="multipart/form-data">
<div class="modal fade" id="Modal_Edit" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabelE" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h5 class="modal-title" id="exampleModalLabelF">Edit Member</h5>
</div>
<div class="modal-body">
<div class="container-fluid">
<input type="hidden" name="member_units" id="member_units" value="<?php if (isset($units_code)){echo $units_code;}?>" class="form-control">
<div class="row-fluid">
<label class="col-md-4 col-form-label">Union Code</label>
<div class="col-md-8">
<input type="hidden" name="member_code_edit" id="member_code_edit" class="form-control" placeholder="Member Code" readonly>
<input type="text" name="union_code_edit" id="union_code_edit" class="form-control" placeholder="Union Code" readonly>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Member Name</label>
<div class="col-md-8">
<input type="text" name="member_name_edit" id="member_name_edit" class="form-control" placeholder="Name">
<span id="member_name_edit_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Address</label>
<div class="col-md-8">
<input type="text" name="member_address_edit" id="member_address_edit" class="form-control" placeholder="Address">
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Member Phone</label>
<div class="col-md-8">
<input type="text" maxlength="11" name="member_phone_edit" id="member_phone_edit" class="form-control" placeholder="Phone">
<span id="member_phone_edit_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Means of ID</label>
<div class="col-md-8">
<input type="text" maxlength="11" name="id_means_edit" id="id_means_edit" class="form-control" placeholder="Type your NIN">
<span id="id_means_edit_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Banker</label>
<div class="col-md-8">
<input type="text" name="banker_edit" id="banker_edit" class="form-control" placeholder="Banker">
<span id="banker_edit_error" class="label label-important"></span>
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Account Number</label>
<div class="col-md-8">
<input type="text" name="accountno_edit" id="accountno_edit" class="form-control" placeholder="Account Number" maxlength="10">
<span id="accountno_edit_error" class="label label-important"></span>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label">Date Joined</label>
<div class="col-md-8">
<input type="date" name="date_joined_edit" id="date_joined_edit" class="form-control datepicker" value="" readonly="">
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label">Upload Passport</label>
<div class="col-md-8">
<input type='file' name='userfile_edit' size='20'/>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<label class="col-md-4 col-form-label" id="g-label">Current Guarantors</label>
<div class="col-md-8">
<div id="current_gurantors"></div>
<!-- <option value="0">A</option> -->
</div>
</div>
<div class="span6">
<label class="col-md-4 col-form-label" id="g-label">Guarantors</label>
<div class="col-md-8">
<select data-placeholder="Type Guarantors" name="guarantors_edit[]" id="guarantors_edit" class="chosen" multiple="multiple">
<!-- <option value="0">A</option> -->
</select>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" id="btn_update" class="btn btn-primary">Update</button>
</div>
</div>
</div>
</div>
</form>
<!--END MODAL EDIT-->
However, when i put the code for Modal_Edit on top of the code for Modal_Add, the problem affects Modal_Edit and vice versa
Edited
when I copied the code to https://www.codeply.com/p?starter=Bootstrap it works fine. What could be the problem?

Related

Livewire modal closing after input changes

I have modal form with multiple inputs. If i put wire:ignore.self, valdiations or submit method just running first time.
<div class="modal fade" tabindex="-1" id="formModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<form class="form">
<div class="fv-row row mb-5">
<div class="col">
<input type="text" class="form-control" wire:model="firstname"/>
#error('firstname')
<div class="fv-plugins-message-container invalid-feedback">
{{ $message }}
</div>
#enderror
</div>
<div class="col">
<input type="text" class="form-control" wire:model="lastname" />
#error('lastname')
<div class="fv-plugins-message-container invalid-feedback">
{{ $message }}
</div>
#enderror
</div>
</div>
</form>
</div>
</div>
</div>
i tried wire:ignore.self and wire:model.defer. Validations just running first time.
Just add wire:ignore.self at the div modal element, also add wire:model.defer for each livewire input.
Your code will be like this:
<div class="modal fade" tabindex="-1" id="formModal" wire:ignore.self>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<form class="form">
<div class="fv-row row mb-5">
<div class="col">
<input type="text" class="form-control" wire:model.defer="firstname"/>
#error('firstname')
<div class="fv-plugins-message-container invalid-feedback">
{{ $message }}
</div>
#enderror
</div>
<div class="col">
<input type="text" class="form-control" wire:model.defer="lastname" />
#error('lastname')
<div class="fv-plugins-message-container invalid-feedback">
{{ $message }}
</div>
#enderror
</div>
</div>
</form>
</div>
</div>
</div>

IntegrityError in database stored vlaues in django?

'''
My problem is database values can't stored properly
In below I uploded views functions file,model file as an images. so in model there are three fields but database stored only image stored and other vlaues strored by default get null values so can you help to solving my problem..
'''
userproblem.html
<form method="POST" action="/uploadoc/" enctype="multipart/form-data" data-toggle="validator">
{% csrf_token %}
<div id="progressbarwizard">
<ul class="nav nav-pills bg-light nav-justified form-wizard-header mb-3">
<li class="nav-item">
<a href="#account-2" data-toggle="tab" class="nav-link rounded-0 pt-2 pb-2">
<i class="mdi mdi-account-circle mr-1"></i>
<span class="d-none d-sm-inline">Query Form</span>
</a>
</li>
</ul>
<div class="tab-content b-0 mb-0">
<div class="tab-pane" id="account-2">
<div class="row">
<div class="col-md-5">
<label class="col-md-12 col-form-label">Query Types:
<span class="text-danger">*</span></label>
<div class="col-md-8">
<input type="text" class="form-control" data-validate="true" name="queryn" placeholder="Enter Query Types">
</div>
</div>
<div class="col-md-5">
<label class="col-md-12 col-form-label">Description of Query:
<span class="text-danger">*</span></label>
<div class="col-md-12">
<textarea type="text" class="form-control" data-validate="true" name="querydec" placeholder="Description of Query"></textarea>
</div>
</div>
</div><!-- /.First row end --><br>
<div class="row">
<div class="col-md-5">
<label for="Emailadrress" class="col-md-12 col-form-label">Upload Your File:
<span class="text-danger"></span></label>
<div class="col-md-12">
<div class="input-group-append">
<input type="file" id="img" name="img" accept="image/*">
</div>
</div>
</div>
<div class="col-md-6">
<label for="Emailadrress" class="col-md-12 col-form-label">Solutions:
<span class="text-danger"></span></label>
<div class="col-md-12">
<div class="input-group-append">
<textarea type="text" name="querysol" placeholder="Solutions of Query"></textarea>
</div>
</div>
</div>
</div> <!-- /.second row end -->
</div><br>
<div class="row">
<div class="col-12">
<div class="text-center">
<div class="mb-3">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck3">
<button type="submit" class="btn btn-primary">
<i class="icon-user icon-white"></i> Submit
</button>
</div>
</div>
</div>
</div> <!-- end col -->
</div>
</div> </div>
</form>
'[This is error and views function file my model imagespage][1]
You are trying to set c variable from userProblemModel named POSTed data in your uploadoc view.
c = request.POST.get('userProblemModel')
But in your form in html side there is no userProblemModel named input tag. That is why you are getting None value in c variable.

Only the first form in Django forloop submitting data. The other forms submit empty fields

I am facing a situation whereby only the first form in the forloop in the code below can submit data. The rest of the forms after the first forloop posts empty data. What could be the problem. I believe my views is good since it's able to process the data from the first form. I believe the problem should be in the code below only that i cannot figure where the issue is
When i hit submit button on the subsequent form i get the following in the shell
[12/Mar/2020 12:07:17] "POST /hotels/conference/cart/twiga-boardroom-3/ HTTP/1.1" 302 0
[12/Mar/2020 12:07:18] "GET /hotels/conference/panari-hotel HTTP/1.1" 200 34389
HTML CODE
{% for item in object.conferenceroom_set.all %}
<div class="room-item">
<div class="row gap-20">
<div class="col-12 col-sm-12 col-md-6">
<div class="row gap-20">
<div class="col-12 col-sm-4 col-md-4">
<div class="image">
<img src="{{ item.room_photo.url }}" alt="{{ item.object.name }}" />
</div>
<p></p>
{% if user.is_authenticated and item.user == user %}
Edit
Delete
{% endif %}
</div>
<div class="col-12 col-sm-12 col-md-8">
<div class="content">
<h5>{{ item.room_Name }}</h5>
<p>{% for list in item.features_as_list %}
<span class="icon-font"><i class="fas fa-check-circle text-primary"></i> {{ list }} </br></span> {% endfor %}</p>
<p class="max-man">Max. Guests : <span class="badge badge-primary">{{ item.room_Capacity }}</span>
<p class="price"><span class="number text-secondary"><small>Ksh</small>{{ item.room_Price|intcomma }}</span> per guest</p>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-6" >
<div class="row gap-20 justify-content-between">
<form method="POST" action="{% url 'conference-update-booking-2' item.slug %}" class='pull-right'>
<div id="airDatepickerRange-general" class="col-12 col-sm-8 col-md-8">
<div class="form-group">
<label class="line12 font13 spacing-05 mt-5 mb-10 block">Check-in</label>
<div class="form-icon-left">
<span class="icon-font text-muted"><i class="bx bx-calendar"></i></span>
<input type="text" name='checkin'id="dateStart-general" class="form-control form-readonly-control" placeholder="dd/mm/yyyy">
</div>
</div>
<div class="form-group">
<label class="line12 font13 spacing-05 mt-5 mb-10 block">Check-out</label>
<div class="form-icon-left">
<span class="icon-font text-muted"><i class="bx bx-calendar"></i></span>
<input type="text" name='checkout' id="dateEnd-general" class="form-control form-readonly-control" placeholder="dd/mm/yyyy">
</div>
</div>
</div>
<div class="col-12 col-sm-4 col-md-4">
<div class="form-group form-spin-group mb-5">
<label class="line12 font13 spacing-05 mt-5 mb-10 block">Attendants</label>
<div class="form-icon-left">
<span class="icon-font"><i class="dripicons-user text-muted"></i></span>
<input name='qty' class="form-control touch-spin-03 form-readonly-control" value="1" readonly/>
</div>
<label class="line12 font13 spacing-05 mt-5 mb-10 block">Reserve</label>
<label class="line12 font13 spacing-05 mt-5 mb-10 block"></label>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-sm btn-block" data-toggle="modal" data-target="#exampleModal2">
Book
</button>
<!-- Modal -->
<div class="modal" id="exampleModal2" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel2" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel2">Book Accomodation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="col-12" style="padding-left:0px">
<input type="checkbox" id="myCheck" onclick="myFunction()"> Do you also wish to book rooms for your guests' stay?
<p></p>
<p></p>
<p></p>
</div>
<div class="row" id="text" style="display:none">
<div class="row gap-20 gap-lg-30 mb-20">
<div class="col-8">
<div class="form-group mb-0" style="padding-left:15px">
<select class="custom-select custom-select-md" name="single_hotel_room">
<option selected="" disabled>Select Single room</option>
{% for room in object.room_set.all %}
<option>{{ room.id}}-{{ room.room_Type}}#{{ room.room_Price}}</option>
{%endfor %}
</select>
</div>
</div>
<div class="col-4">
<div class="form-group mb-10" style="padding-right:15px">
<div class="form-icon-left">
<span class="icon-font"><i class="dripicons-user text-muted"></i></span>
<input name='single-guests' class="form-control touch-spin-03 form-readonly-control" value=""/>
</div><label class="line12 font13 spacing-05 mt-5 mb-10 block">Guests</label>
</div>
</div>
</div>
<div class="row gap-20 gap-lg-30 mb-20">
<div class="col-8">
<div class="form-group mb-0" style="padding-left:15px">
<select class="custom-select custom-select-md" name="double_hotel_room">
<option selected="" disabled>Select Double room</option>
{% for room in object.room_set.all %}
<option>{{ room.id}}-{{ room.room_Type}}#{{ room.room_Price}}</option>
{%endfor %}
</select>
</div>
</div>
<div class="col-4">
<div class="form-group mb-10" style="padding-right:15px">
<div class="form-icon-left">
<span class="icon-font"><i class="dripicons-user text-muted"></i></span>
<input name='double-guests' class="form-control touch-spin-03 form-readonly-control" value=""/>
</div><label class="line12 font13 spacing-05 mt-5 mb-10 block">Guests</label>
</div>
</div>
</div>
<div class="row gap-20 gap-lg-30 mb-20">
<div class="col-8">
<div class="form-group mb-0" style="padding-left:15px">
<input type="date" id="checkindate" name="checkindate" class="form-control form-readonly-control">
<label class="line12 font13 spacing-05 mt-5 mb-10 block">CheckIn Date</label>
</div>
</div>
<div class="col-4">
<div class="form-group mb-10" style="padding-right:15px">
<div class="form-icon-left">
<span class="icon-font"><i class="dripicons-user text-muted"></i></span>
<input name='nights' class="form-control touch-spin-03 form-readonly-control" value=""/>
</div><label class="line12 font13 spacing-05 mt-5 mb-10 block">Nights</label>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary btn-sm btn-block">Continue</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% csrf_token %}
</form>
{% endfor %}```
I want to answer this question myself so that if there will be any newbie who will face this problem will get a solution here. Only the first form in the forloopwould submit or post data because i was using the same name for the modal div id tag. I modified my code above by generating unique modal div id. To do this i added {{forloop.counter}} to id="exampleModalLabel. This ensured that every autogenerated modal would be generated with unique div id tag. I hope this helps someone. Thanks

In line view of forms in modal

I am using Bootstrap modal.
The following is my code.
<!-- Modal -->
<div class="modal fade" id="editModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4>Edit Equifax Credit Score Data</h4>
</div>
<div class="modal-body form-horizontal">
<div class="form-group row">
<label for="name" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="equiFaxName"
placeholder="Name" readonly="readonly" />
</div>
</div>
<div class="form-group row">
<label for="startRangeModal" class="col-sm-2 col-form-label">Start
Range</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="startRangeModal"
placeholder="Start Range" />
</div>
</div>
<div class="form-group row">
<label for="endRangeModal" class="col-sm-2 col-form-label">End
Range</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="endRangeModal"
placeholder="End Range" />
</div>
</div>
<div class="form-group row required">
<label for="riskGradeModal" class="col-sm-2 col-form-label">Risk
Grade </label>
<div class="col-sm-10">
<input type="text" class="form-control" id="riskGradeModal"
placeholder="Risk Range" />
</div>
</div>
<div class="form-group row required">
<label for="agentRiskGradeModal" class="col-sm-2 col-form-label">Agent
Display Grade</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="agentRiskGradeModal"
placeholder="Agent Display Grade" />
</div>
</div>
<div class="form-group row required">
<label for="hitCode" class="col-sm-2 col-form-label"> Hit
Code</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="hitCodeModal"
placeholder="Hit Code" />
</div>
</div>
<div class="form-group row required">
<label for="hitCodeResponse" class="col-sm-2 col-form-label">
Hit Code</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="hitCodeResponseModal"
placeholder="Hit Code Response" />
</div>
</div>
<div class="form-group row required">
<label for="approvalTypeListModal" class="col-sm-2 col-form-label">Approval
Type</label> <select id="approvalTypeListModal" class="form-control">
</select>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary"
data-dismiss="modal">Cancel</button>
<button class="btn btn-success"
id="submitEditModalData">Save</button>
</div>
</div>
</div>
</div>
In the modal all the form inputs are inline horizontal but the select tag shows below the label and is not inline with the label.
Can someone help me in putting the select box in line and not below the label.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="form-group row required">
<label for="approvalTypeListModal" class="col-md-2 col-sm-2 col-xs-2 col-form-label">Approval
Type
</label>
<div class="col-md-10 col-sm-10 col-xs-10">
<select id="approvalTypeListModal" class="form-control">
<option value="option1">Option1</option>
</select>
</div>
</div>
You forgot to put class col-md-* .
You can put it in select tag or can make a new div and give it to that class.
Hope this helps.

Align text with columns

I want to display the text box for phone number in the following format
(555)-555-5555.
Whenever I try to add the dashes or bracket they do not align correctly.
How can I achieve this?
Fiddle
Code:
<div class="row">
<div class="large-2 columns">
<label class="inline right">* Phone:</label>
</div>
<div class="large-3 columns">
<span>(</span>
<input type="text" id="areaCode" name="areaCodeTab" maxlength="3" />
<span>)</span> -
</div>
<div class="large-3 columns">
<input type="text" id="phoneMiddle" name="phoneMiddleTab" maxlength="3" /> -
</div>
<div class="large-3 columns end">
<input type="text" id="phoneYearTab" name="phoneYearTab" maxlength="4" />
</div>
<div class="row">
<div class="large-2 columns">
<label class="inline right">* Phone:</label>
</div>
<div class="large-6 columns">
<div class="row collapse">
<div class="large-3 columns">
<span class="prefix"> ( </span>
</div>
<div class="large-6 columns">
<input type="text" id="areaCode" name="areaCodeTab" maxlength="3" />
</div>
<div class="large-3 columns">
<span class="postfix"> ) - </span>
</div>
</div>
</div>
<div class="large-2 columns">
<input type="text" id="phoneMiddle" name="phoneMiddleTab" maxlength="3" /> -
</div>
<div class="large-2 columns end">
<input type="text" id="phoneYearTab" name="phoneYearTab" maxlength="4" />
</div>
</div>
I think this is right, you may want to change the sizes of things but it all fit's together the way I think you're after.
EDIT
Like this then?
<div class="row">
<div class="large-3 columns">
<label class="inline right">* Phone:</label>
</div>
<div class="large-3 columns">
<div class="row collapse">
<div class="large-1 columns">
<p class="">(</p>
</div>
<div class="large-10 columns">
<input type="text" id="areaCode" name="areaCodeTab" maxlength="3" />
</div>
<div class="large-1 columns">
<p class="">)-</p>
</div>
</div>
</div>
<div class="large-3 columns">
<input type="text" id="phoneMiddle" name="phoneMiddleTab" maxlength="3" /> -
</div>
<div class="large-3 columns end">
<input type="text" id="phoneYearTab" name="phoneYearTab" maxlength="4" />
</div>
</div>
Can't help but think it looks better with the post and pre fix though.