Lucius Vorenus - Any quick way of 1. Displayin...
# ❓questions
l
Any quick way of 1. Displaying a medias field in a (component) block form with the 'Edit Info' (ie Alt Text & Caption fields) opened by default? 2. Alter title and adding notes to those? Don't see anything in Medias.php or BaseFormFiald.php that would seem to faciliatate this. Purpose for this is to give additional guidance to user.
i
no way of opening it by default but we could easily add a prop to control that. you can add a
note
to the media field as a whole though. For the title of these fields you can use the translation keys I guess, and we could expose a prop for the note, but it's not available at the moment
l
Thanks. Need the user to fill those in for SEO and accessibility. Certainly the alt would be required, caption optional. (Of course, I could do that programmatically, but I don't think the outcome for SEO would be just as optimal) For a different reason, I actually have a separate alt and caption input iwth my image blocks, so I can live with the current state fine. I would say that it would be useful to have a key in
Medias::make()
to do that in future (eg(
->expanded()
). Perhaps the Alt text and Caption field attributes could be overridden with this or a different key(s)? Are there any other fields like this, wonder? The other thing I would mention, as a feature, perhaps, is that there is not (in Form Builder, as far as I can see) a means of inserting a longer text section to guide users in filling in that particular set of fields. Always found having a collapsible (and initially collapsed) help section useful in addressing many of the simple things that users might query. ($isInEditor(sp?) isn't available when using the form, is it?)
i
great points: - alt and caption are also in the media library and the fields under Edit info are meant to override them contextually, which is an accessibility recommendation (that the alt text can't be the same every time the same image is used as often it needs specific context). In most cases the image is used once and the media library alt and caption are correct and don't need to be overrode in the Edit info collapsible - there is a feature to add more fields to the media library sidebar and to the edit info section on each media fields (use cases like copyright, etc...) - in the blade approach you were free to put any html between fields to give documentation to users. In the OOP approach, you can still use the BladePartial field to achieve that
not sure I got your point about $isInEditor
l
Your first point there is correct. Don't want necesseraly the same data everytime. Second is extraMetadatas, isnt it? I thought it would have been possible in the blade files, but hadn't got to the later run trhough to add things like that. BladePartial fields? Must look at those.
i
correct
l
Thanks for all of that.