私のページには、朝食、昼食、夕食の 3 つの選択肢があります。それらにカーソルを合わせると、食事を選択するためのリクエスト ボタンがあります。これにより、ユーザーがフォームでさまざまな食事を選択できるモーダル フォームが表示されます。
食事の種類に食事 IN ADDITION を追加したいのですが。ただし、食事の種類を確認できる唯一の方法は、この情報を 1) モーダル ダイアログと 2) そこの送信ボタンに渡すことです。
この 2 つのことをどのようにすればよいでしょうか。
関連コード:
テンプレート
<div class="row-fluid">
<div class="span12 hero-unit">
<div class="row-fluid">
<h3> What Type of Meal Is It- Breakfast Lunch or Dinner? </h3>
</p>
<br>
</div>
<div class="row-fluid align-center">
<div class="span4">
<div>
<div class="library-image-parent">
<img src="{{ STATIC_URL }}images/breakfast.png"
width="200" height="160" alt="1" />
<div class="options">
<ul class="unstyled" style="font-size:16px;">
<div class="span11" style="text-align:center;">
<a href="#myModal" role="button" class="btn btn-success" data-toggle="modal">Request A Meal</a>
</div>
</div>
</div>
</div>
</div>
食事のリクエストを行うためのモーダルフォーム
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Select Your Meal to Make a Request</h3>
</div>
<div class="modal-body">
<form enctype="multipart/form-data" method="POST" action="" class="uniForm">
<fieldset class="inlineLabels">
{% csrf_token %}
<h6> Meal </h6>
<br>
{{ formtoaddrequest.meal }}
<br>
<div class="form_block" style="float:right;">
<input class="btn btn-primary" type="submit" value="{% trans 'Add Request' %}">
</div>
</fieldset>
</form>
</div>
</div>