How to add a custom field to a form in IPB

Wow, I am very amazed that the Invision Power Board support is so lacking (this is paid software!).
I just can't find the documentation for what I want to do, and I'm talking about what I could do in five minutes with any other forum software.

Anyway, the question is: basically I need to add a custom form field (selection menu) to the "New Topic" page on my forum. I added a select tag to the postFormTemplate template, and I also created a subclass hook for the public_forums_post_post class. I override the saveForm function, which allows me to save the value of this new field that I added.

The problem is this: how to set the initial value? that is, is there a loadForm function or something like that that will allow me to load the initial value for the field and then pass it to the template? I hope my question is clear enough. Please ask if you need clarification.

+4
source share
1 answer

I agree with Endophage, although you can see this article . It provides enough documentation for what you need to do.

Capturing a template is exactly what you need. However, if you need to add custom fields to the registration form, there is a function built into ACP.

0
source

Source: https://habr.com/ru/post/1336692/


All Articles