How to show rendered html value of var ? #2459
Unanswered
sergeynilov
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In laravel/framework 9.1 admin area with orchid/crud 3.8 and orchid/platform 13.6
I need to show on the form custom data where source data do not have fixed structure and source fields
can be in different order with different data.
I keep all these custom data in string including image with given path, like :
$feedbackResponseCustomValuesHTML .= '<img src="'.$uploaded[0]['attachment'][0]['url'].'" style=\'max-width:120px; border:1px dotted gray\'>';
But I did not find in which can I show this var like :
{{ $feedbackResponseCustomValuesHTML }}
I tried to add custom component in the form , like
and app/View/Components/orchid/ShowSourceHtml.php has lines :
But as result in both cases above I have code in $feedbackResponseCustomValuesHTML, but not rendered
html code of this var...
If I uncommented line with component :
Layout::component(ShowAttachmentFile::class),
I got error :
Orchid\Screen\Builder::Orchid\Screen\{closure}(): Argument #1 ($field) must be of type Orchid\Screen\Contracts\Fieldable, Orchid\Screen\Layouts\Component@anonymous given, called in
If there is a way to to show rendered html value of this var ?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions