filling fields based on content of other fields.
I have a textarea where users are expected to paste in some structured XML, I would like to take the attributes of the top level XML Element and set the other fields in the form to these element's values and remove the top level element before it is stored into the database. Is logic and parsing like this possible with vanilla filament? I expect I'll have to use some sort of regex unless XML parsing is possible at runtime like this.
Solution:Jump to solution
The Filament part would be using
```php
->live()
->afterStateUpdated(fn (Set $set) => parse and set fields)...
1 Reply
Solution
The Filament part would be using
PHP should come with SimpleXML extension by default which you could use: https://www.php.net/manual/de/book.simplexml.php