Вопрос

On Drupal 7 if i use a textfield with number of values set to unlimited, every time i edit the node, appear a new empty textarea, why? it is a drupal bug?

The new empty textarea should only appear if you use the Add more button.. I cant leave empty this new textarea, so when edit the node, i need that appear only textarea that have a content, and then the user can change it.

How i can fix this? I hope I have explained the problem well, I tried to change the form with form_alter, but I could not solve it in this way.

Thanks in advance for any advice.

Это было полезно?

Решение

Well, it is not a Drupal bug. Drupal offers you an empty field for quick addition, and if the field is empty, it simply does not get added to database.

In your case, your editor adds an empty <p></p> tag. So, the textarea looks empty but it's not.

A quick solution is to click on Disable rich-text and remove the content of the last textarea just before you save the node.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top