如何将id属性设置为Zend形式

时间:2018-07-18 06:36:57

标签: php jquery zend-framework2 zend-form

我必须为Zend Framework表单设置ID。我已经尝试过this 但会在ID的末尾附加一些加密的字符串。 以下是我的代码:

Flatlist

在浏览器中显示为

import React from "react";
import { View, Slider, Text} from "react-native";
import TrackPlayer, { ProgressComponent } from "react-native-track-player";
import { formatTime } from "./utils";
global.MineKey = null; //Here I used Global Variable
class ProgressBar extends ProgressComponent {
  static setCurrentPlayer = player => {
    global.MineKey = player;         //Setting global variable on every call from the cardview upon play
  };

  onSliderEditStart = () => {
    TrackPlayer.pause();
  };
  onSliderEditEnd = () => {
    TrackPlayer.play();
  };
  onSliderEditing = value => {
    TrackPlayer.seekTo(value);
  };

  render() {
    const position = formatTime(Math.floor(this.state.position));
    const duration = formatTime(Math.floor(this.state.duration));
    return global.MineKey == this.props.PlayerKey ? (  //If Global variable key is equal to the Key of RowItem of Flatlist
      <View style={{ flexDirection: "row",alignItems: "center", flex: 1,width: "100%"}}>
        <Text style={{ color: "white", alignSelf: "center" }}>{position}</Text>
        <Slider
          onTouchStart={this.onSliderEditStart}
          onTouchEnd={this.onSliderEditEnd}
          onValueChange={this.onSliderEditing}
          value={this.state.position}
          maximumValue={this.state.duration}
          maximumTrackTintColor="gray"
          minimumTrackTintColor="white"
          thumbTintColor="white"
          style={{
            flex: 1,
            alignSelf: "center"
          }}
        />
        <Text style={{ color: "white", alignSelf: "center" }}>{duration}</Text>
      </View>
    ) : null;
  }
}
module.exports = ProgressBar;

我可以在jQuery代码中使用ID名称 my_form 还是需要更改属性。

0 个答案:

没有答案