|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Populate a text area in Zope from ZSQL method
I have a field in a form which needs to be auto populated by the results of a ZSQL method. The result of the ZSQL is outputted to a column name called HIGH_AVG. I need the output of that column to auto populate a text box on the form
<input type=text value=(return of sql method)> I have tried this <input type=text name=HIGH_AVG value="<dtml-in sql_method_name>" </dtml-in> > Please help with this problem wabirdman |
|
#2
|
|||
|
|||
|
i think you want to put the <dtml-in> call outside the html tag.. like this:
<dtml-in sql_method_name> <INPUT TYPE="TEXT" VALUE="<dtml-var sql_column_name>"> </dtml-in> be aware that if your query returns more than one record, you will end up with a number of text fields each containing the appropriate text from one of the records. |
|
#3
|
|||
|
|||
|
auto populate
I tried doing that yitz, but it still has not worked. The only other thing I can think of is this. I only want 1 field from the ZSQL method to be returned in to the text box. I have tried cutting the ZSQL so that it only returns one field and that still does not work. I am at a complete loss as to what is happening. Is there a way in which you can call a particular field to be auto populated??
Cheers wabirdman |
|
#4
|
|||
|
|||
|
SUCCESS
Thanks anyway, but I have worked it out. I also was able to have radio buttons that changed the value in the text box.
code for anyone who cares <table> <tr> <td></td> <TD valign="top" NOWRAP><B>Average Spend:</B></TD> <td><!--#in sql_handset_details_for_handset_code --><input type=text name=HIGH_AVG value="<!--#var HIGH_AVG -->"><!--#/in--></td> <TD> <B>3 Month:</B> <!--#var 3_MONTH_AVG --> <INPUT type="radio" name="AVG_CALL_SPEND_BASIS" value="3M" language=javascript onclick="document.thisForm.HIGH_AVG.value='<!--#var 3_MONTH_AVG -->';" checked> </TD> <TD> <B>6 Month:</B> <!--#var 6_MONTH_AVG --> <INPUT type="radio" name="AVG_CALL_SPEND_BASIS" value="6M" language=javascript onclick="document.thisForm.HIGH_AVG.value='<!--#var 6_MONTH_AVG -->';"></TD> <td></td> </tr> </table> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Populate a text area in Zope from ZSQL method |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|