Feature request: default value + placeholder in edit mode

Permalink Browser Info Environment
Adding default values (+ placeholder to visualize this in edit mode) to some field types might be useful (e.g. link_text, textbox, ...)

I guess the block designer might look crowded with this feature but adding those fields to a finished block is quite uncomfortable (and you loose the feature to re-edit the block in the Block Designer afterwards).

Type: Discussion
Status: Resolved
j3ns
View Replies:
ramonleenders replied on at Permalink Reply
ramonleenders
Hi there,

OK, could be good indeed. Not for each field type though, but for some indeed. Uhm, what should a default value do then? Is this only upon CREATING a block and not editing? Because if you once created a block, I can assume you do not want to see a default value if you left a field blank! Right?

It sure will be crowded, will have to see what I can do about that.

Let me know what you think :)

Kind regards,

Ramon
j3ns replied on at Permalink Reply
j3ns
I currently indeed do use the placeholder as a fallback if the field was left blank in edit mode since in my usecase this allows me easily change 90% of my block instances to a new value without editing each single block.

I guess this might not apply to most other users. Placeholders would be nice in edit mode to give further details without cluttering the form. :)
ramonleenders replied on at Permalink Reply
ramonleenders
So if a field is being left blank, you want to use this default value and have a placeholder with this value to let the user know this is being taken? Can you give an example for both form.php and controller.php. I'm not sure if everyone wants this behavior, I assume if one enters a default value the field is initally filled with this value and if I want it to be blank, I delete this default value and blank value will be the eventual value. At least, that's how I see it. Maybe, most likely, I'm missing something here, but I want it to be perfectly clear for others as well if I will be implementing this. Otherwise I get the same questions you know :)
j3ns replied on at Permalink Reply
j3ns
Okay. I think I would like

a) placeholders for appropriate input types: explaining the purpose of the input field without messing up the form. (hints for seperators, limits, ...)

b) optional fallback values. that are used if the field is left blank when the block is rendered. This way you could easily change a value for many block instances at the same time without the need to edit each individually. The placeholder in a) would in addition give the block creator any freedom to mention this behavior.

(E.g.: I have a lot of instances of a Teaser block that all share (more or less) the same "show more" text. When the client decides to have a different linktext in all teaser...this could easily be done with a fallback value and clearing the cache) :)

Default values would serve a different usecase and they could easily be added in a single place in the add() function if needed.
ramonleenders replied on at Permalink Reply
ramonleenders
j3ns,

As you might have noticed, I've been updating block designer. These changes have been applied to the "text box" field type. Hope you like it :)

Kind regards,

Ramon
j3ns replied on at Permalink Reply
j3ns
Hi Ramon,

yes! Package is updated and I took a look at the diff. :)
I still have to build some new blocks from scratch to test the features.

Thanks!

Kind regards,
Jens

concrete5 Environment Information

irrelevant

Browser User-Agent String

irrelevant

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.