Here is a slightly more advanced example of using the wpmem_register_form_rows filter to modify a form input element. In this case, we will take a regular dropdown select field and add the optgroup label tag to sections of it.
Note: for best results in understanding this customization, it is best to create a test field exactly as described in this example and using the example scripts as they are written. Once you have it working, then you can move to creating this process for your specific field. Continue Reading →