Bug: Form default values are not working for text fields

The "values" field in a form is used to define the possible range of values and to select a default value. At least, this is how it works for non-text fields.

If a field is of type "text" or "textarea", however, the default value is ignored.

This is due to the way this value is obtained in Form::renderForEdit. It ignores the value in the form field and pulls the value only from the meta data. I believe it would be better to do so only if there is already a form attached. If we change the form and this field exists in both forms we probably should preserve this field.

Note that a consequence of this is that if the default value for a field of type "select" is non-empty, but an empty field is possible, then the empty field is chosen incorrectly instead of the stated default value.

Note that one could argue whether the behavior for text and textarea is really a bug (albeit it seems clear to me), but the behavior for select is definitely contrary to the documentation.

There is a gotcha if this were fixed as discussed above. Meta::getFormDef splits the default value into separate fields and removes leading and trailing white space. This should only be done for fields other than text and textarea, as otherwise we will loose the white space information.

A fix to this problem for the situation of SimpleTableEntryUsingForms is attached to that page (includes the handling of the splitting of fields).

Sven, there is a problem in that this simple patch interferes with the setting of fields through parameters, at least in Athens. I am trying to come up with an alternative, but I think we need to be careful here, as PeterThoeny is using that feature. Can you attach the patch to this patch, and I will test this.

I'll attach the diff later, but it is possibly going to be difficult to apply to athens. don't worry too much about breakages - I use this code extensivly at work for the companies workflow system (the Task management system for all projects). so its hugely important that it works for me

I am not trying to apply it to athens, but to the latest beta. However, I think that any enhancement must be consistent with the existing code unless it is explicitly changed. But anyway, I'll take a look at your changes to make sure that the problems that existed are not there....