Need a little help
Permalink 1 user found helpful
Hi guys
I am hoping someone can help me here.
I am creating a new add-on and part of this I need to create a block that will allow the user to add in <li> items. I can do this no problem but the user will be able to add in as many <li> as they require and I am not sure how to implement.
Basically the user will add the block and from that block they can add a category name and save. while still in the block window they can add a second, third etc etc until they have what they need. When they submit it, it will build something like:
<ul id="menu">
<li id="all"><a href="all" onclick="javascript:qcksand('all');return false;">all</a></li>
<li id="web"><a href="web" onclick="javascript:qcksand('web');return false;">web</a></li>
<li id="print"><a href="print" onclick="javascript:qcksand('print');return false;">print</a></li>
<li id="video"><a href="video" onclick="javascript:qcksand('video');return false;">video</a></li>
</ul>
As you can see the category name is placed in 3 times into each <li> item.
I just need help on the block 'editor' part for the user to insert the categories.
Hope someone can help and if they do I will give them a copy of the block for free! ;-)
I am hoping someone can help me here.
I am creating a new add-on and part of this I need to create a block that will allow the user to add in <li> items. I can do this no problem but the user will be able to add in as many <li> as they require and I am not sure how to implement.
Basically the user will add the block and from that block they can add a category name and save. while still in the block window they can add a second, third etc etc until they have what they need. When they submit it, it will build something like:
<ul id="menu">
<li id="all"><a href="all" onclick="javascript:qcksand('all');return false;">all</a></li>
<li id="web"><a href="web" onclick="javascript:qcksand('web');return false;">web</a></li>
<li id="print"><a href="print" onclick="javascript:qcksand('print');return false;">print</a></li>
<li id="video"><a href="video" onclick="javascript:qcksand('video');return false;">video</a></li>
</ul>
As you can see the category name is placed in 3 times into each <li> item.
I just need help on the block 'editor' part for the user to insert the categories.
Hope someone can help and if they do I will give them a copy of the block for free! ;-)
Don't know if this will really class as helping enough to get a free copy ;) but if you look at the c5 Survey Block which has the ability to add multiple options without leaving the edit window... specifically add.php & auto.js I think this has exactly the functionality you are looking for.