Both dev/alpha wrap the field twice. This means I cannot change the styling of the element and is causing a lot of problems. I was wondering if you could point me in the right direction of why this is occurring.
I have the following setup:
- Editable fields dev version
- Most up to date Drupal
- Field as type number integer
- Editable field turned on, Click to edit and empty set to "0"
- Custom field template with following code to wrap the number in a black circle and append a title
<?php foreach ($items as $delta => $item):
<span class="round-circle black pull-left"><?php print render($item); ?></span>
<?php endforeach; ?>
<strong><?php print $element['#title'];?></strong>
This is the output HTML I'm getting:
<span class="round-circle black pull-left"><div id="editablefields-field-years-experience" class="editablefield-item editablefield-processed"><form class="editable-field" action="/user/1" method="post" id="editablefields-form-profile2-3-field-years-experience" accept-charset="UTF-8"><div><span class="round-circle black pull-left">1</span>
<strong>Years experience</strong>
<button class="editablefield-edit editablefield-edit-button btn form-submit ajax-processed" id="edit-edit--2" name="edit-" value="Edit this field" type="submit">Edit this field</button>
<input type="hidden" name="form_build_id" value="form-XXXXXXX">
<input type="hidden" name="form_token" value="XXXXXXX">
<input type="hidden" name="form_id" value="editablefields_form__profile2__3____field_years_experience">
</div></form></div></span>
<strong>Years experience</strong>
The problem is that the form is wrapped with "round-circle black pull-left" and then the field itself within the form again! This means that the button and my title are both messing up.
I had a look through the module but can't seem to figure out how to override it so that when using an editable field it should just use a different field template and then render the field again with the correct template within the form.
Comments
Comment #1
jnpwebdeveloper commentedNo one has had this issue? Can someone at least point me in the right direction?
Comment #1.0
jnpwebdeveloper commentedUpdate php code
Comment #2
jnpwebdeveloper commentedComment #3
joelpittetThanks for cleaning up the queue