4

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

Anyway, the question: basically I need to add a custom form field (a select menu) to the 'New Topic' page in my forum. I added a select tag in the postFormTemplate template, and I've also created an hook subclassing the public_forums_post_post class. I'm overriding the saveForm function which allows me to save the value of this new field I added.

The problem is: how do I set its initial value? i.e., is there any loadForm function or something like that, which would allow me to load an initial value for the field and then communicate it to the template? I hope my question is clear enough. Please ask if you need clarification.

ySgPjx
  • 10,165
  • 7
  • 61
  • 78
  • i know nothing about this software, but does public_forums_post_post inherit from something else? perhaps the more generic classes would contain the load event, and you'd just need to override that function in your subclass. – nathan gonzalez Jan 25 '11 at 17:47
  • I have not used that system either, buuut: is there a javascript framework / library loading with the page? e.g., If jQuery is loaded, I can tell you how to accomplish what you need with a single line of code. Obviously, this would be sub-optimal if taking this approach introduces a javascript dependency that doesn't already exist in the app., but it might be something to consider for a short term fix if nothing more substantive is offered... – emanaton Jan 26 '11 at 18:05
  • @emanaton: I already know how to do that ;) but I really want to learn how to do it using the board's plugin system. Thanks anyway. – ySgPjx Jan 26 '11 at 18:25

1 Answers1

0

I agree with Endophage, though you may want to look at this article. It provides enough documentation for what you need to do.

A template hook is exactly what you need. However, if you need to add custom fields to the registration form, there's a function built-in to the ACP.

Zack
  • 2,477
  • 4
  • 37
  • 50