sbj
Well-known member
Hello,
so finally after reading about php/XF for 1 month, I will try to develop my 1st addon (1st milestone of it).
What I want to do:
So basically what I want to do is a blank page with 6 dropdowns and 6 textboxes.
The dropdowns should list the entries which will be in the database table.
The textboxes should allow me to write into the database, so the dropdowns can show the entries.
My problems so far:
1) I can't get the params passed to the template, altough I defined actions for that.
2)I don't know how to write xenforo-html-form for the template, to submit the entries.
3)I don't know how to populate the dropdowns with the params (which aren't passed currently).
4)The DataWriter forces me to write a update condition method, which I understand for why it is but I don't know how to use it, like what kind of conditions I can give.
Stuff I have to figure out later:
1)Using XFCP system (which is not hard to do) for the extending of core classes.
2)Make php to create a portal page for the template (currently I use a XF page node).
3)Implement a 2nd route, so 1 page lists the dropdowns, the 2nd one lets me enter values.
4)Make dropdown list order by alphabet, instead of dropdown_id.
I called the addon DataDirectory.
(See 2nd post for the rest of the codes)
I am new to php/coding and to creating addons. Any kind of help is highly appreciated.
Thank you.
so finally after reading about php/XF for 1 month, I will try to develop my 1st addon (1st milestone of it).
What I want to do:
So basically what I want to do is a blank page with 6 dropdowns and 6 textboxes.
The dropdowns should list the entries which will be in the database table.
The textboxes should allow me to write into the database, so the dropdowns can show the entries.
My problems so far:
1) I can't get the params passed to the template, altough I defined actions for that.
2)I don't know how to write xenforo-html-form for the template, to submit the entries.
3)I don't know how to populate the dropdowns with the params (which aren't passed currently).
4)The DataWriter forces me to write a update condition method, which I understand for why it is but I don't know how to use it, like what kind of conditions I can give.
Stuff I have to figure out later:
1)Using XFCP system (which is not hard to do) for the extending of core classes.
2)Make php to create a portal page for the template (currently I use a XF page node).
3)Implement a 2nd route, so 1 page lists the dropdowns, the 2nd one lets me enter values.
4)Make dropdown list order by alphabet, instead of dropdown_id.
I called the addon DataDirectory.
Code:
</br>
<fieldset>
<form action="{xen:link 'datadirectory/artist'}" method="post"
<dl class="ctrlUnit">
<dt><label for=".....">Enter Artist Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for=".....">Enter Composer Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for=".....">Enter Lyricist Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for=".....">Enter Makam Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for=".....">Enter Form Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for=".....">Enter Usul Name:</label></dt>
<dd><input name="....." value="" id="....." class="textCtrl OptOut" type="text"></dd>
</dl>
</br>
</br>
</br>
I need a submut button here!
</br>
</form>
</fieldset>
</br>
</br>
</br>
</br>
<fieldset>
<dl class="ctrlUnit">
<dt><label for="...">Artist:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</br>
<dl class="ctrlUnit">
<dt><label for="...">Composer:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for="...">Lyricist:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for="...">Makam:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for="...">Form:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</dl>
</br>
<dl class="ctrlUnit">
<dt><label for="...">Usul:</label></dt>
<dd>
<select name="..." class="textCtrl autoSize" id="."></select>
</dd>
</dl>
</dl>
</fieldset>
(See 2nd post for the rest of the codes)
I am new to php/coding and to creating addons. Any kind of help is highly appreciated.
Thank you.