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:
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
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:
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
Last edited: