I'm using jQuery to add a form element. It appears on the page fine, with the correct value, but when I submit the form, the data doesn't show up on the PHP backend. I looked at Firebug's POST data and I don't see it in there either. The javascript I'm using to add the form element is:
$("#projectArray").append("<input type='text' name='data[Project][description]' value='"+projectDescription+"' id='test' />");
Has anyone run across anything like this? I've seem other posts but they seem to be typos and from what I can tell, I don't have any typos in this line.
Edit: As requested, here is the form code. I cut a lot of it out, as it is a pretty large form. If anyone wants the complete code, I can paste it.
<form action="/learningexperiences/add" id="LearningexperienceAddForm" method="post" accept-charset="utf-8">
<div style="display:none;"><input type="hidden" name="_method" value="POST"/></div>
<div class="input text"><tr><td><label for="LearningexperienceSubjectarea">Subject Area</label> </td><td><input name="data[Learningexperience][subjectarea]" maxlength="50" type="text" id="LearningexperienceSubjectarea"/></td></tr>
...
<tr><td>Active</td><td><div class="cbx"><input type="hidden" name="data[Learningexperience][active]" id="LearningexperienceActive_" value="0"/><input type="checkbox" name="data[Learningexperience][active]" checked="checked" value="1" id="LearningexperienceActive"/></div></td></tr>
<tr><td colspan="2" style="vertical-align:middle;"><div id="projectArray"></div></td></tr>
...
<input type="hidden" name="data[Learningexperience][id]" id="LearningexperienceId"/><tr><td colspan="2" style="vertical-align:middle;"> </td></tr>
</table>
<table id="buttonsTable">
<tr><td style="text-align:right;"><div style="margin-right:5px;"><div class="submit"><input name="cancel" type="submit" value="Cancel"/></div></div></td>
<td><div class="submit"><input type="submit" value="Save Record"/></div></form></td></tr>
</table>
Edit 2: I changed my append tag to append to the form element (#LearningexperienceAddForm). I don't know why, but it started working at that point.