Hi all
i have dropdown well populated that feed a field in a table
name of dropdown: priority_accepted1
[strong]VALUES
n:Normal
h:High
v:Very High[/strong]
it works ok and save the keys n, v or h in database
now i need to save in a field of another table, a text composed by the value (not the key) and something else
in an avent (Change_priority) i put
{fn:save_evento_chat$descrizione_evento=Priority changed to (data:priority_accepted1) (n-Normal h-High v-Veryhigh)}
if for example i choose VeryHigh it store
Priority changed to v (n-Normal h-High v-Veryhigh)
it works ok
but for a better visualization i would like to store something like
Priority changed to Normal
Priority changed to High
Priority changed to Very High
i tried
{fn:save_evento_chat$descrizione_evento=Priority changed to (data:priority_accepted1.value) }[br] but it doesn't work[br][br]is there a way to take the value from dropdown and not the key?
thank you
i have dropdown well populated that feed a field in a table
name of dropdown: priority_accepted1
[strong]VALUES
n:Normal
h:High
v:Very High[/strong]
it works ok and save the keys n, v or h in database
now i need to save in a field of another table, a text composed by the value (not the key) and something else
in an avent (Change_priority) i put
{fn:save_evento_chat$descrizione_evento=Priority changed to (data:priority_accepted1) (n-Normal h-High v-Veryhigh)}
if for example i choose VeryHigh it store
Priority changed to v (n-Normal h-High v-Veryhigh)
it works ok
but for a better visualization i would like to store something like
Priority changed to Normal
Priority changed to High
Priority changed to Very High
i tried
{fn:save_evento_chat$descrizione_evento=Priority changed to (data:priority_accepted1.value) }[br] but it doesn't work[br][br]is there a way to take the value from dropdown and not the key?
thank you
i solved in this way
created a custom code in php that populate a data value {data:priority_data} and call it before the function with parameters
if you need it is this
<?php
$priority=$this->data("priority_accepted1");
if ($priority=='n'){
$this->set("priority_data","Normal");
}
if ($priority=='h'){
$this->set("priority_data","High");
}
if ($priority=='v'){
$this->set("priority_data","Very High");
}
now, for a dropdown populated from table i need the same but i think i have to read again from table filtering value from dropdown
the start answer remain, changing a bit:
Is there a way to store the value of dropdown before the form is sent?
Not the key, the value.
created a custom code in php that populate a data value {data:priority_data} and call it before the function with parameters
if you need it is this
<?php
$priority=$this->data("priority_accepted1");
if ($priority=='n'){
$this->set("priority_data","Normal");
}
if ($priority=='h'){
$this->set("priority_data","High");
}
if ($priority=='v'){
$this->set("priority_data","Very High");
}
now, for a dropdown populated from table i need the same but i think i have to read again from table filtering value from dropdown
the start answer remain, changing a bit:
Is there a way to store the value of dropdown before the form is sent?
Not the key, the value.
You mean the LABEL. The "value" IS the key.
And no, not without javascript.
And no, not without javascript.
hi healyhatman
yes i mean label
for now i mark as solved
p.s.
if someone have a javascript already written, post it please.
yes i mean label
for now i mark as solved
p.s.
if someone have a javascript already written, post it please.
This topic is locked and no more replies can be posted.