PeterWilliam
PeterWilliam
FFilament
Created by PeterWilliam on 11/6/2024 in #❓┊help
How to get value from JS generated radio component
thanks for the hint,I will have a look at it. For now I solved this special task by writing the data (it's ONE number) to a cookie and reading it in php.
5 replies
FFilament
Created by PeterWilliam on 11/6/2024 in #❓┊help
How to get value from JS generated radio component
interesting: while trying to find a livewire solution I get this: Public property [$selectedTopicId] not found on component: [menu-logins] there is no component of that name, the word doesn't exist in my source code. had been trying this: window.updateSelectedTopicId = function(topicId) {
console.log("setze jetzt Selected Topic ID über Livewire auf:", topicId);
const livewireComponentId = document.querySelector('[wire\:id]').getAttribute('wire:id'); if (!livewireComponentId) { console.error("Livewire-Komponente nicht gefunden."); return; }
const livewireComponent = Livewire.find(livewireComponentId); livewireComponent.set('selectedTopicId', topicId); // Setzt den Wert von 'selectedTopicId' in Livewire console.log("Selected Topic ID über Livewire gesetzt auf:", topicId); };
5 replies