Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

How to auto fill form fills based on data from a table?

$
0
0

I have a form which the data is being submited to a table.

Using the collumn month_date_show I would like to auto fill the form

if that date exist in the collumn in the table, since it will only be submit once a month.

If the date does exist in the table then the user will be able to edit those results, if it does not exist

then no need to autofill the user will submit new results for that month.

Not sure if this is something that will have to use ajax or javascript to make it happen.

Right now I hardcoded the values in the form , but i would like to make it dynamic.

all the data is in the cse_result_summary.

 

<cfquery datasource ="intranet" name="GetSummary">  SELECT * from cse_result_summary  </cfquery><form method="post" name="myform" action="cse_execoffice_datepicker_test.cfm" onsubmit="return validateForm()">  <table >  <tr>  <td>  <input type="text" id="dpMonthYear"  NAME="month_date_show" value="9/2014" style="width:80px;" />  </td>  <td>   <img alt="Month/Year Picker" onclick="showCalendarControl('dpMonthYear');"  src="pictures/datepicker.gif" />  </td>  </tr>  </table>  <table >  <tbody>  <tr>  <td>  Rising Star Award Winner:</td>  <td><input type="text" name="risingstar" size="50" class="get_branches_departments_displaynum" value="john"></td>  </tr>  <tr>  <td>Department Average:</td>  <td><input type="text" name="risingstar_ave" size="8" class="get_branches_departments_displaynum" value="5"></td>  </tr>  <tr>  <td>  Rising Star Award Winner runner-up:</td>  <td><input type="text" name="risingstar_runner" size="50" class="get_branches_departments_displaynum" value="joe"></td>  </tr>  </tbody>  </table>  <p><input type="submit" name="Submit" value="Submit"></p>  </form>

 

i have also submitted this question on

 

coldfusion - How to auto fill form fills based on data from a table? - Stack Overflow


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>