New custom field type using InputListField

I quite often use buttons in my panel, which contain a title and url. I would love to build these into a single field in the blueprint which contains both values.

Did some research and it seems like I need to create a InputListField type of field. This then outputs a number of sub-fields based on $this->options() which calls fieldoptions::build($this); to get the options.

That’s where I am stuck. How can I hard-code in my field class that it should always have two sub-values (title,url).

Thanks for the help.

Why do you need to have the values in a single field? Using two fields makes it easy to use the two values separately later.