How does Mini Program's multiple input with the same name name make the values traverse the value assembly like jquery?

problem description

demand: modify multiple store names + addresses at the same time;

the environmental background of the problems and what methods you have tried

Mini Program cannot operate dom;. I don"t know how to assemble multiple stores + addresses.

related codes

/ / Please paste the code text below (do not replace the code with pictures)

clipboard.png

wxml; traverses the store list

 <form bindsubmit="formSubmit" bindreset="formReset">
      <view wx:for="{{storeArr}}">
        <view>
          <image src="/images/people.png" mode="widthFix"></image>
          <text></text>
          <input value="{{item.storeName}}" disabled="{{disabledStore}}" cursor-spacing="90" />
        </view>
        <view>
          <image src="/images/gps.png" mode="widthFix"></image>
          <text></text>
          <input value="{{item.sotreAddress}}" disabled="{{disabledStore}}" cursor-spacing="90" />
        </view>
      </view>
  </form>
<button class="confirmModify {{disabledStore == false || modifyEmp == true ?"show":"hide"}}" bindtap="confirmModify"></button>

js


Page({
  data: {
    storeArr: [
      {
        storeId: "1",
        storeName: "",
        sotreAddress: ""
      },
      {
        storeId: "2",
        storeName: "2",
        sotreAddress: "2"
      },
    ],
  },
})

what result do you expect? What is the error message actually seen?

how to deal with this situation?

Dec.07,2021

<view wx:for='{{setUp.prize}}' wx:key='index' data-index='{{index}}'>
    <input style='width:350rpx;' type='text' name="whatIsIt{{index}}" data-index='{{index}}'></input>
  </view>

so that all name names have


1: bind the same event

clipboard.png
2:

clipboard.png

ps: storeArr: [{storeId:1,storeName:' store 1'}]

Menu