It seems like the issue you're facing is that the data from the textarea is not being sent to the server when the action is triggered. Since you've confirmed that there are no JavaScript errors and no network requests being made, it's possible that the issue lies with how the action is being triggered or how the data is being collected in the frontend.
Here are a few steps you can take to troubleshoot and resolve the issue:
-
Ensure the Field Name Matches: Double-check that the name you're using to retrieve the field data in the
handlemethod matches the name you've given to the field in thefieldsmethod. In your case, it should be 'URLs'. -
Check Nova Version: Make sure you are using a version of Nova that supports the
showInline()method. If you are using an older version, this method might not be available, and the action might not be triggered correctly. -
Inspect the Form Data: When you trigger the action, inspect the network request in your browser's developer tools to ensure that the form data is being sent correctly. Look for the
URLsfield in the form data of the POST request. -
Check JavaScript Console: Even though you mentioned there are no JavaScript errors, it's worth checking the console again when you trigger the action to see if any errors are logged at that moment.
-
Nova JavaScript Customization: If you have any custom JavaScript for Nova, ensure it's not interfering with the form submission.
-
Force Form Submission: As a last resort, you can try to force the form submission using JavaScript to ensure that the data is being sent. This is not recommended as a permanent solution but can help you debug the issue.
If none of these steps resolve the issue, you may need to look into creating a custom component for your action that handles the data submission properly.
Here's a basic example of how you might force the form data submission using JavaScript (for debugging purposes only):
document.querySelector('form[action*="your-action-endpoint"]').addEventListener('submit', function(e) {
e.preventDefault();
const formData = new FormData(this);
formData.append('URLs', document.querySelector('textarea[name="URLs"]').value);
fetch(this.action, {
method: 'POST',
body: formData,
headers: {
'X-Requested-With': 'XMLHttpRequest',
// Add any other headers required by your Nova setup
}
}).then(response => {
// Handle the response
}).catch(error => {
// Handle any errors
});
});
Remember to replace 'your-action-endpoint' with the actual endpoint your action is posting to. This code is for debugging purposes and should not be used in production without proper adjustments and testing.