The dialog box is invoked by clicking on the input path. How can I determine the input id from which it was called in the dialog box? Ie, we need this functionality: document.getElementById("oldtag").value = val; , only without specifying the input id manually. It is necessary that it determines itself, because there will be more input with other id that use the same dialog box
Connection dialog box:
<div style='display:none;' id='select_tag'> <?php require_once __DIR__.'/../tag/_tag.php'; ?> </div> Form, on click on which opens a dialog box:
<input id="oldtag" name="Tag[name]" onclick="$('#select_tag').dialog('open');" value="<?=$model_tag->name?>" type="text" required/>