nesman
Member
Hi folks,
After watching Kier's wonderful development series for Xenforo 2 I began to make an add-on for my local community. Making the static pages was easy and those work beautifully. I'm at a part now where I am trying to make a form so admins can upload files to our game servers through Xenforo.
I've gotten the form mocked out:
![1659913934486.png 1659913934486.png](https://xenforo.com/community/data/attachments/271/271024-a29b8c805fd311dad5033b181c9c742e.jpg?hash=opuMgF_TEd)
The part I am stuck at is trying to figure out how to/where to put the php script/function that the submit button would be calling after an admin uploads the files. Would I put something in "action" like you normally do in an html form? Is there something I call in the add-on controller? Any tips/direction pointing would be greatly appreciated![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
After watching Kier's wonderful development series for Xenforo 2 I began to make an add-on for my local community. Making the static pages was easy and those work beautifully. I'm at a part now where I am trying to make a form so admins can upload files to our game servers through Xenforo.
I've gotten the form mocked out:
![1659913934486.png 1659913934486.png](https://xenforo.com/community/data/attachments/271/271024-a29b8c805fd311dad5033b181c9c742e.jpg?hash=opuMgF_TEd)
Code:
<xf:form action="" method="post" enctype="multipart/form-data">
<xf:upload name="upload" accept=".bsp,.bz2" type="file" name="mapfile[]" id="mapfile" multiple="multiple" style="padding: 100px 0px 100px 0px; text-align: center;"/>
</xf:form>
<xf:submitrow submit="{{ phrase('Upload') }}" fa="fa-upload" />
The part I am stuck at is trying to figure out how to/where to put the php script/function that the submit button would be calling after an admin uploads the files. Would I put something in "action" like you normally do in an html form? Is there something I call in the add-on controller? Any tips/direction pointing would be greatly appreciated
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
Last edited: