dongmingxiang0312 2014-09-09 13:11
浏览 44

在Bootstrap popover上生成symfony2表单很慢

Generating forms using Symfony2 is nice when you go from one page to another, but when you want a form to be generated on the fly and attached to a bootstrap popover, it really slows down the popover from showing (or the form itself) because of the AJAX request/response (which gives back the symfony2 form html).

I have a calendar, much like Google Calendar and I want a form to be generated for each slot clicked on it. Google Calendar is really nice and smooth, and opens the popover alongside a text field instantly, no lags. How can I achieve that smoothness and still keep using Symfony2 forms?

Right now I've disregarded Symfony2 forms to handle the issue but I don't like doing it this way. I've attached this html form directly and I'm handling the processing using the Request object parameters in Symfony2 conroller:

<form class="form-horizontal picker-popover" role="form" data-form="schedule-picker">
<div class="col-sm-6">
<select class="form-control" data-type="start-time" name="startTime">
<option selected value="0">START TIME</option>
</select>
</div>
<div class="col-sm-6">
<select class="form-control" data-type="end-time" name="endTime">
<option selected value="0">END TIME</option>
</select>
</div>
<div class="col-sm-12">
<textarea class="form-control" placeholder="Description..." data-type="description" name="description"></textarea>
</div>
<input type="hidden" name="tutorId" value="5" />
<div class="col-sm-12 text-center">
<input type="submit" class="btn btn-primary skl-green-button" value="BOOK SESSION" />
</div>
</form>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)
    • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。