I Need some assistance or suggestions.
Essentially this is what I need to accomplish:
Predefined items to be inserted into a text box, the predefined options are created in a seperate table.
Here is a demo:
http://screencast.com/t/uJfiz4TjV
The problem is, the dropdown box does not currently get the items from the database. This is because I cannot put PHP Code into the Template file (Everything upto this point has been HTML and JS) - to query the DB and generate the list options (It is all hard coded for testing at this stage).
When I look at the Template file however I do see the Dropdown boxes that Appgini generate, are called using shortcodes?
Code: Select all
<div class="row form-control-static"><div class="col-xs-11"><%%COMBO(delivery_address)%%><%%PLINK(delivery_address)%%><%%ADDNEW(addressbook)%%></div></div>
1. Is there a way I can define custom shortcodes, So I can put the PHP Code elsewhere, and just call the shortcode when I want to display my custom dropdown box in the template?
2. Could I create a Lookup fields in AppGini and then somehow call that using my JS Code (See below)?
Code: Select all
<script>
function insertText() {
document.getElementById("loaddetails").value += document.getElementById("item").value+"\n";
}
</script>