How to add multiple custom fields to video form?

Hello,

Is there a way to add multiple custom fields to the video form? I was only able to add a single custom field by following the [docs](https://docs.joinpeertube.org/contribute-plugins?id=add-custom-fields-to-video-form).

Also, I was not able to add HTML elements (ex: Button).

 const commonOptions = {
    name: 'new-button',
    type: 'html',
    html: '<button type="button">click me</button>',
    default: ''
  }

You should just call registerVideoField multiple time, with different first parameters. Can you copy/paste your code? (or a link to your repository).

The problem with the vanishing button element must be because Peertube sanitizes the given html. I don’t know if it is possible to add buttons.

Thank you @JohnLivingston I was able to add multiple custom fields.

But adding html seems hard.

I did not check, but I think that’s because the html is sanitized to prevent malwares. That means that only some html tags are allowed (the one’s that are not a security risk, like a, b, div, …).
If there are some tags that you need that are not allowed, you can open a ticket on the peertube’s github repo to ask for allowing them in a future version.

Noted. Thank you.

Is there a way to add custom html element in advanced settings page of video form other than plugin settings?

I think not. If you need this feature, you can try to request it here: Issues · Chocobozzz/PeerTube · GitHub