doudeng9425 2012-01-06 13:04
浏览 46

如何在vtiger crm中为州名添加下拉框

I have a form and I have to add state name field with a drop down so the user can select name of the state they want from that select box.

How can I do this?

  • 写回答

4条回答 默认 最新

  • douguanyan9928 2012-01-06 15:16
    关注

    Assuming you have a databse like mysql.

    • create a table state (state_id, state_name, state_abbr)
    • fetch the states from the state table (write a function to fetch states)
    • iterate in your option of the select box using php script example:

              <select name="state">
                <?php 
                   *// At this point you should have a recordset $rsstate which fetches all the records from the state table*
                  while($rowState = mysql_fetch_array($rsState)){?>
                  <option value=<?php echo $rowState["state_abbr"]?>><?php echo $rowState["state_name"]; ?></option>
                <?php }?>
               </select>
      
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?