Welcome Guest, Not a member yet? Register   Sign In
Dropdown Form sampel needed
#11

[eluser]Kyle Johnson[/eluser]
I think I had something similar to this, just not in a model.

How would this work with the Form_validation library?
#12

[eluser]reneschaub[/eluser]
Hmm habs imme rnich nicht ganz kappiert.
auf www.pcs-basel.ch/rechnungen.zip kannst du dir mal meinen angepassten bambooInvoice script ziehen.

Ziel ist es in der Datei rechnungen\bamboo_system_files\application\views\invoices\newinvoice.php per Dropdown Menü einen Support auszuwählen und dieser dann der Rechnung eingefügt wird.

sql :
Tabelle / supporter
- id
- SupporterName

Tabelle / invoices
- sid

Habe in invoice_modell.php $this->db->join('supporter', 'supporter.ID = invoices.sid');
Habe halt einfach das problem ein Dropdown Feld zu erstellen Sad

Dann habe ich noch ein ander Problem villeicht kannst du mir bei dem Problem helfen?

Auch in der Datei newinvoice.php habe ich 4 Text Felder die in die DB
rechnugen / invocies / h1,h2,h3,h4 abgespeichert werden.

Code:
if (isset($_POST['h1'])):
$h1 = $_POST['h1'];
$h2 = $_POST['h2'];
$h3 = $_POST['h3'];
$h4 = $_POST['h4'];

$seconds_dif = mktime($h1,$h2) - mktime($h3,$h4);
$ergebnis = floor($seconds_dif/60);
$ergebnis2 = $ergebnis * 1.5;

Der wert ergebnis2 soll auch in die DB invoices abgelegt werden.
Aber ich weich nicht wo und wie ich die Zeitberechnung oben ablege. Ist das ein Modell?

Ich bin noch ein ziemlicher Codeigniter noop. Wie heist so schön aller Anfang ist schwer!
Und bin dir für jede hilfe Stellung sehr sehr dankbar!!!!

Gutes lerne im Japanisch... Gruss Rene
#13

[eluser]The Wizard[/eluser]
[quote author="Kyle Johnson" date="1238808136"]I think I had something similar to this, just not in a model.

How would this work with the Form_validation library?[/quote]

it actually is designed to work with the lib Smile
repopulate the form by creating the dropdown INITIALIZED with the value ( select_id )
so when you populate the form, the chosen city is selected Smile


i will return in 10 hours and try to explain
#14

[eluser]Kyle Johnson[/eluser]
[quote author="herrkaleun" date="1238837655"][quote author="Kyle Johnson" date="1238808136"]I think I had something similar to this, just not in a model.

How would this work with the Form_validation library?[/quote]

it actually is designed to work with the lib Smile
repopulate the form by creating the dropdown INITIALIZED with the value ( select_id )
so when you populate the form, the chosen city is selected Smile


i will return in 10 hours and try to explain[/quote]

No worries. I just completely missed the section in the function that was explicitly for the selected_id.

Ooops.
#15

[eluser]The Wizard[/eluser]
good. i hope it helps you guysSmile




Theme © iAndrew 2016 - Forum software by © MyBB