Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

C3RC1: Forms - textarea - standard value can't be deleted #4722

Closed
Anke opened this issue Aug 29, 2012 · 8 comments
Closed

C3RC1: Forms - textarea - standard value can't be deleted #4722

Anke opened this issue Aug 29, 2012 · 8 comments
Labels
Milestone

Comments

@Anke
Copy link

Anke commented Aug 29, 2012

If a textfield with a defined standard value is converted into a textarea the standard value stays there and can't be deleted.

You have to change it back into a textfield, erase the standard value, save and reconvet into a textarea.

(Not sure if it was the same behavior with Contao 2.)

@leofeyer
Copy link
Member

The default value should be ignored by the textarea widget.

@lindesbs
Copy link

Same behaviour in 2.11.4 on demo.contao.org

Define a default value for the textfield. Save entry.
In the frontend, the default value is visible.

Now change the type of the FormItem to textarea.
Defaultvalue ist replaced by dimensions of textarea.

But the default value is still displayed in the frontend.

@leofeyer
Copy link
Member

Thanks for checking, I have moved the ticket to the 2.11.6 milestone.

@leofeyer
Copy link
Member

leofeyer commented Sep 3, 2012

Fixed in 4170caf.

@leofeyer leofeyer closed this as completed Sep 3, 2012
@lindesbs
Copy link

lindesbs commented Sep 3, 2012

Please add type "select" to the list. Its the same behaviour.
The DefaultValue from textfield is the selected Item, in an list. When switching field type.

;-)

@leofeyer
Copy link
Member

leofeyer commented Sep 4, 2012

Maybe we should work with a positive list instead of a negative list. AFAIK, default values are only required for text and password fields, aren't they?

@lindesbs
Copy link

lindesbs commented Sep 4, 2012

As i can see in the palette entry, there is only text and hidden : https://github.com/contao/core/blob/2.11.5/system/modules/backend/dca/tl_form_field.php#L117

Password formfield did not use the default value : https://github.com/contao/core/blob/2.11.5/system/modules/frontend/FormPassword.php#L143

I think, it will be autofilled by browser.

I prefer a whitelist, which can be enhanced by $GLOBALS ? Maybe ;-)

@leofeyer
Copy link
Member

leofeyer commented Sep 5, 2012

Changed in 83e4789. The routine checks the palette, which is kind of a built-in whitelist :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants