This topic is locked

Spreadsheet mode and I want inline Delete

9/3/2025 10:48:00 AM
PHPRunner General questions
B
bioman author

Hi,
I'm using spreadsheet mode but would like an inline delete option. I can't seem to get a button to show up that allows users to delete a row inline. Instead, they need to click the box and then delete from the top. Is it possible to do inline delete? I have the inline add and inline edit boxes checked for the row. The user also has all permissions. Thanks,
Brett

ChatGPT 9/3/2025

Hi Brett,

In PHPRunner, the inline delete functionality is not available by default in the spreadsheet mode. However, there are a couple of approaches you can consider to enable inline deletion or improve the user experience:

  1. Custom Button for Inline Delete: You can add a custom button for deleting a row inline. You can achieve this by using JavaScript to create a delete button in each row of the spreadsheet. Here's a simplified approach:

    • Go to the "Edit As" settings for the field you want to use.
    • Use the "Custom" option to add a button that triggers a JavaScript function to delete the row.

    Here is a basic example of what the JavaScript function might look like:

    function deleteRow(rowId) {
    if(confirm('Are you sure you want to delete this row?')) {
    // Use AJAX to delete the row from the database
    $.ajax({
    url: 'delete_row.php', // Your PHP script to handle deletion
    type: 'POST',
    data: { id: rowId },
    success: function(response) {
    // Reload or refresh the spreadsheet to reflect changes
    location.reload();
    }
    });
    }
    }

  2. Using a Link or Icon: Instead of a button, you could use an icon or a link that calls the deleteRow function mentioned above. This could be added to the row template in the "Edit As" settings.


  3. Check PHPRunner Documentation/Support: If you are looking for a more integrated solution, you may want to check the PHPRunner documentation or reach out to their support team, as they may have released new features or updates that include inline deletion or similar functionalities.


  4. Feature Request: If inline deletion is a crucial feature for your application, consider submitting a feature request to the PHPRunner development team. They might prioritize it for future updates.



Remember to test any customizations thoroughly to ensure they work as expected in your application.

If you have any further questions or need assistance with specific code, feel free to ask!

Best,
[Your Name]

B
bioman author 9/4/2025

This seems like a pretty complex way to do this. Is there no built in way to delete a row inline? That seems surprising.