Hi,
If I had two tables one called ingredience and the other soup. It is quite painfull to put 20 ingredience in one soup. Is there any more convenient way? It is sopposed to work with a form for users to create more entries. So punching in the ids is not an option.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/3HTTdoGnCAA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
<h1>Example 1: Typical Usage</h1>
<form action="./example_results.php" method="post">
<label for="cities1">What are your favorite cities?</label>
<select id="cities1" multiple="multiple" name="cities[]" title="Click to Select a City" class="sminit">
<option>Amsterdam</option>
</select>
<p><input type="submit" name="submit" value="submit" /></p>
</form>
<?php
if(!empty($_POST['submit'])) {
echo "<html>\n<body style='width: 400px; margin: 2em auto; font-family: Arial;'>";
if(!empty($_POST['cities'])) {
echo "\n<p><strong>You selected the following cities:</strong></p>\n<ul>";
foreach($_POST['cities'] as $city) {
// exclude any items with chars we don't want, just in case someone is playing
if(!preg_match('/^[-A-Z0-9\., ]+$/iD', $city)) continue;
// print the city
echo "\n\t<li>" . htmlspecialchars($city) . "</li>";
}
echo "\n</ul>";
} else {
echo "\n<p>No items selected</p>";
}
echo "\n<p><a href='index.html'>Try Again?</a></p>";
echo "\n</body>\n</html>";
} else {
// if someone arrived here not having started at example.html
// then show example.html instead
require("index.html");
}
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/3HTTdoGnCAA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
any named optional attribute is passed to the <form> tagfor example _class, _id, _style, _action, _method, etc.sorry if this doesn't make much sense I'm sure I am just missing the java knowledge I'm pretty new to programming and am learning through trial and error...