This topic is locked

List > View in PopUp

7/6/2025 4:26:24 PM
PHPRunner General questions
H
Hopper author

I am having no luck removing the padding in the view popup window, to eliminate the wasted space. Any help is greatly appreciated.

Thanks
GNH

img alt

ChatGPT 7/6/2025

To remove padding in the view popup window in PHPRunner, you typically need to modify the CSS associated with that specific popup. Here’s how you can do it:

  1. Access the CSS File: In PHPRunner, go to the “Design” section and look for “Custom CSS” or “Edit CSS” option. This is where you can add your custom styles.


  2. Add Custom CSS:
    You can add custom CSS rules to target the padding of the popup window. You might want to add something like the following:

    .popup {
    padding: 0 !important; /* Remove padding */
    margin: 0 !important; /* Remove margin if needed */
    }

    Make sure to inspect the actual class name of the popup element using your browser’s developer tools to ensure you are targeting the right element.


  3. Save and Publish: Once you have added the custom CSS, save your changes and publish your application.


  4. Test the Popup: Open the view popup again to see if the padding has been removed. You may need to clear your browser cache or refresh the page to see the changes.



If you are still having issues or if the class names are different, you might need to inspect the popup elements in your browser to find the correct classes to target.

Feel free to reach out if you need further assistance!

H
Hopper author 7/6/2025

I am looking for a PHPRunner specific answer. I have already expended ~50 minutes with ChatGPT with no resolve.

D
druck281 7/8/2025

I know there are some other similar posts where people have used CSS but so far, I have not been able to make any of them work. Add, edit and view pages can all be put in a popup without wasted space but for some reason, there is no option to do this with a list page. I really wanted to be able to popup some audit logs for a record without all the extra space or opening the full-size list page in another window but for now, the best I can do is using a snippet and rendering out an HTML table with the data. I have not tried to make the snippet interactive though.

$recordID = $_SESSION["currentRecord"]["idcrt_CertPerson"]; //$_SESSION set in ProcessRecordValues
$certGroupGUID = $_SESSION["currentRecord"]["GroupID"];

$strSQL = DB::PrepareSQL("SELECT * FROM ...);

$rs = DB::Query($strSQL);

// Always show header and table structure
echo '<div class="cert-history-box">
<h4>Certification History</h4>
<table class="table table-sm">
<tr>
<th>Effective Date</th>
<th>Expiration Date</th>
<th>Notes</th>
</tr>';

if ($rs && $record = $rs->fetchAssoc()) {
// Output first row
echo "<tr>
<td>" . date("m/d/Y", strtotime($record["EffectiveDate"])) . "</td>
<td>" . date("m/d/Y", strtotime($record["ExpirationDate"])) . "</td>
<td>" . htmlspecialchars($record["Notes"]) . "</td>
</tr>";

// Output remaining rows
while ($record = $rs->fetchAssoc()) {
echo "<tr>
<td>" . date("m/d/Y", strtotime($record["EffectiveDate"])) . "</td>
<td>" . date("m/d/Y", strtotime($record["ExpirationDate"])) . "</td>
<td>" . htmlspecialchars($record["Notes"]) . "</td>
</tr>";
}
} else {
// No records — show a full-row message inside the table
echo '<tr><td colspan="3"><em>No prior certifications found.</em></td></tr>';
}

echo '</table></div>';