<!--pages/form/index.wxml-->
<view class='form-contaienr'>
  <form bindsubmit="formSubmit">
    <image wx:if="{{ data.top_image }}" src='{{ data.top_image }}' class='top-image'></image>
    <view class='top-desp' wx:if="{{ data.top_desp }}">{{ data.top_desp }}</view>
    <view class='{{ formContainerClass }}'>
      <view class='form-body'>
        <view wx:if="{{ data.text_1_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.text_1_need == 1 }}" class='need-label'>*</text>{{ data.text_1 }}</view>
          <view class='form-input'>
            <input name="text_1"></input>
          </view>
        </view>
        <view wx:if="{{ data.text_2_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.text_2_need == 1 }}" class='need-label'>*</text>{{ data.text_2 }}</view>
          <view class='form-input'>
            <input name="text_2"></input>
          </view>
        </view>
        <view wx:if="{{ data.text_3_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.text_3_need == 1 }}" class='need-label'>*</text>{{ data.text_3 }}</view>
          <view class='form-input'>
            <input name="text_3"></input>
          </view>
        </view>
        <view wx:if="{{ data.text_4_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.text_4_need == 1 }}" class='need-label'>*</text>{{ data.text_4 }}</view>
          <view class='form-input'>
            <input name="text_4"></input>
          </view>
        </view>
        <view wx:if="{{ data.multi_text_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.multi_text_need == 1 }}" class='need-label'>*</text>{{ data.multi_text }}</view>
          <view class='form-input'>
            <textarea name='multi_text'></textarea>
          </view>
        </view>
        <view wx:if="{{ data.radio_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.radio_need == 1 }}" class='need-label'>*</text>{{ data.radio }}</view>
          <view class='form-input'>
            <radio-group name='radio'>
              <label class="radio" wx:for="{{ data.radio_value }}">
                <radio value="{{ item }}"/>{{ item }}
              </label>
            </radio-group>
          </view>
        </view>
        <view wx:if="{{ data.checkbox_status == 1 }}" class='form-group'>
          <view class='form-label'>
            <text wx:if="{{ data.checkbox_need == 1 }}" class='need-label'>*</text>{{ data.checkbox }}</view>
          <view class='form-input'>
            <checkbox-group name='checkbox'>
              <label class="radio" wx:for="{{ data.checkbox_value }}">
                <checkbox value="{{ item }}"/>{{ item }}
              </label>
            </checkbox-group>
          </view>
        </view>
        <view class='form-btn'>
          <view wx:if='{{ data.money && data.money != "0" }}'>
            <button formType="submit" type='primary'>付款</button>
          </view>
          <view wx:else>
            <button formType="submit" type='primary'>提交</button>
          </view>
        </view>
      </view>
    </view>
  </form>
</view>