[How-To] Invoke the "Insert/edit link" modal on a custom field
-
Hello,
The insert/edit link modal and its functionality is very convenient for inserting links in the content editor. I was wondering if it was possible to leverage this modal for other purposes such as a custom field?
I am finding many clients have custom post types that have custom fields that link to other areas of the site. The insert/edit link modal would be perfect for this, as of right now I have to instruct them to find the link they are looking for, copy and paste it into the field, which many of them find tedious or even difficult (remember we’re not all Internet savvy).
I did some searching but wasn’t able to find anything relevant. The modal would be invoked by either focusing on the custom field itself (think the Datepicker from jQueryUI) or by clicking some button or element. In either case, as long as the user clicks the “Add Link” button the modal closes like normal and the value is inserted into the custom field (again, like the Datepicker).
Is this possible? If not I may create a trac ticket as a feature request because I am finding this becoming more and more common as clients ask for more complicated websites.
Thanks in advance!
- The topic ‘[How-To] Invoke the "Insert/edit link" modal on a custom field’ is closed to new replies.