Hi,
I’m using phpmaker 2022. I want to use select2 for a field. (RTL)
my code:
<select multiple="multiple" id="HelpDocs">
<?php
$sql = "SELECT edudocs.*, members.FullName FROM edudocs join members on edudocs.User = members.MemberID WHERE edudocs.User = '".$myRow['User']."' OR edudocs.IsPublic = 'Y' ORDER BY edudocs.DocTitle ASC";
$stmt = ExecuteQuery($sql);
if ($stmt->rowCount() > 0) {
while ($row = $stmt->fetch()) {
if ($myRow['AttachedFiles']){
$packs = explode(',',$myRow['AttachedFiles']);
if (in_array($row['ID'], $packs)){
$selected = "selected";
} else {
$selected = "";
}
}
echo "<option value=\"".$row['ID']."\" $selected>".$row['DocTitle']." | ".$row['FullName']."</option>";
}
}
?>
</select>
$("#HelpDocs").select2({
placeholder: 'انتخاب بسته درمان',
language: "fa",
width: '100%'
});
The problem is that the select2 search box width is NOT 100% and when I try to edit the selected value the search box was shown on the right?How can I use MODAL in this case?
Thanks