Using SafeCracker on EE 2.1.3 and it’s working great, just as expected. One thing that’s weird is that I’m getting two of the same textareas and text inputs in my form. The duplicate is not identical to the first one but it’s pretty similar. Take a look below to see what I mean. I’m using the code that’s provided in the documentation for custom fields so I can’t imagine what’s going on (other fieldtypes, including Matrix, is working fine).
Here’s the code in my form template for textareas and text inputs:
{if textarea} <textarea id="{field_name}" name="{field_name}" dir="{text_direction}" rows="{rows}">{field_data}</textarea> {/if}
{if text} <input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" /> {/if}
This is what SafeCracker is spitting out:
<textarea rows="6" dir="ltr" name="profile-overview" id="profile-overview">Lorem ipsum dolor</textarea>
<textarea dir="ltr" id="profile-overview" rows="6" cols="90" name="profile-overview">Lorem ipsum dolor</textarea>
<input type="text" size="50" maxlength="128" value="" name="profile-website-url" id="profile-website-url" dir="ltr">
<input type="text" maxlength="128" dir="ltr" id="profile-website-url" value="" name="profile-website-url">
Does anyone have a solution for this or even an idea of what could be going wrong?