Jump to content

updating a script with repeating fields


This topic is 5715 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've created and exhaustive script that validates the entry in a particular field.The validation forces the user's entry into a standard form. I've now decided that I need repetitions for this field because users are inclined to enter multiple values in this field for expedience which will only standardize the first value. There are a maximum of 5 repeating fields. So to make a long story short.... I want to edit my validation script to loop through all repetitions, if they exist. What is the quickest way to change all the references to that field to now include a repetion number fieldname[n].

Link to comment
Share on other sites

It's not entirely clear what you're asking. You can insert values into a specific repetition by entering the repetition number where you select the destination field. You can retrieve a specific repetition by using the array notation:

repeating field[repetion number]

However, it's generally better to use a related table to hold a variable amount of user-editable data, like this. A portal can be used to edit or show it, and you can loop through them if needed.

Link to comment
Share on other sites

This topic is 5715 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.