0

I have a form with a number of text inputs & 4 textareas named: features, description, description2, description3

When I submit the form and print_r($_POST); all values are printed as you would expect, but when I attach jHtmlArea or CLE Editor to the 4 textareas the last 2 textareas are loosing the posted data.

<form method="post" action="index.php" enctype="multipart/form-data">
    <legend>Page 1</legend>
    <label>Photo</label>
    <input type="file" name="image[]" multiple id="file" style="margin-bottom:15px;"/>
    <label>Title (Property Type & Area)</label>
    <input type="text" name="page_1_area_type" class="span8"/>
    <label>Reference</label>
    <input type="text" name="reference" class="span8"/>
    <label>Bedrooms</label>
    <input type="text" name="bedrooms" class="span8"/>
    <label>Bathrooms</label>
    <input type="text" name="bathrooms" class="span8"/>
    <label>Plot Size</label>
    <input type="text" name="plot_size" class="span8"/>
    <label>Constructed Area</label>
    <input type="text" name="constructed_area" class="span8"/>
    <label>Terrace</label>
    <input type="text" name="terrace" class="span8"/>
    <label>Parking</label>
    <input type="text" name="parking" class="span8"/>
    <label>Price</label>
    <input type="text" name="price" class="span8"/>
    <label>Features</label>
    <textarea id="editor1" name="features">435</textarea>
    <label>Description</label>
    <textarea id="editor2" name="description">34534</textarea>
    <button type="button" class="btn" id="btn-step1">Page 2<i class="icon-arrow-right"></i></button>
    </div>
    <!-- END STEP 1 --> 
    <!-- STEP 2 FORM -->
    <div class="step hide" id="step2">
      <legend>Page 2</legend>
      <label>Photo</label>
      <input type="file" name="image[]" multiple id="file" style="margin-bottom:15px;"/>
      <label>Property Details</label>
      <textarea id="editor3" name="description2">4354354</textarea>
      <div style="clear:both;"></div>
      <button type="button" class="btn" id="btn-step2">Next <i class="icon-arrow-right"></i></button>
    </div>
    <!-- END STEP 2 --> 

    <!-- STEP 3 FORM -->
    <div class="step hide" id="step3">
    <legend>Page 3</legend>
    <label>Photo</label>
    <input type="file" name="image[]" multiple id="file" style="margin-bottom:15px;"/>
    <label>About Title</label>
    <input type="text" class="span8" value="About South West Mallorca" name="page_3_title"/>
    <label>About Content</label>
    <textarea id="editor4" name="description3">43534534</textarea>
    <div style="clear:both;"></div>
    <button type="submit" name="download" class="btn">Download PDF <i class="icon-arrow-right"></i></button>
  </form>

Javascript

 $(function(){
 $("textarea").htmlarea();
 });

Any help would be much appreciated.

Tommy Arnold
  • 3,339
  • 8
  • 31
  • 40

1 Answers1

0

You get the 2 first fields values. their name property is different.

while the other 2 is the same and the only difference is the digit

i would suggest either using description[] or changing the names of the fields completely.

Also answered you on DP.

Let me know if it worked.

Neta Meta
  • 4,001
  • 9
  • 42
  • 67
  • I tried both suggestions and still only getting the first 2 textarea values print_r: Array ( [page_1_area_type] => vfgfd [reference] => gdg [bedrooms] => fdgf [bathrooms] => dgdf [plot_size] => gfdg [constructed_area] => dfgfdg [terrace] => fdgfd [parking] => gdfg [price] => fdgd [alt] => Array ( [0] => fgfdgfdg [1] => fdgfdg ) [page_3_title] => About South West Mallorca [download] => ) 1 – Tommy Arnold Sep 18 '12 at 12:33