I have a function I'm trying to accomplish where a field will default populate with its latest entry. I know I can use the code field_id=x, however I have to duplicate this field over one thousand times throughout the course of 200 forms and updating the field ID every single time will be incredibly time consuming. Is there a broader command for this function? Something like entry_id=last or something?
It's for a tournament registration system. Basically, a player inputs their selection of what they will be using to compete with in that field, and after they submit, the form will reload and leave their entry in the field as a visual confirmation. But it's a large tournament with 200 teams (approximately 2,000 players). So I was hoping there could be a broader command than entering it's own field ID in order to get this effect. Because when I duplicate the form for each team, I have to update this field ID number every time. Each form is essentially a "team center", where the 10 players of that team update their selections in each designated spot of the form every week.
You're displaying this value in "as a visual confirmation". Why are you using a field if it's meant only as a visual reminder? Are the user's allowed to change the value after it's been submitted on the first form?
Yeah the users can change the value after submitting.
So, you want to carry the value forward until a user changes it in a subsequent form, then carry the new value forward until it is changed again in a different form?
I'm concerned about why you need to keep duplicating a form. When you duplicate an entire form, every field ID and key changes. This means any custom code that may be required to provide the functionality you need won't be able to be built ensuring software portability. Duplicating forms is a problematic design. Why can't you do this is in just one form? Can you share your form design so we can get a picture of why they must be duplicated? It seems a tad over engineered.
The issue comes from the nature of the tournament type.
Its a team tournament where a team is comprised of 11 players and 7 are assigned by a captain to compete each week. As it is now, i have one form for the captain where they assign a player, and then those selections for the week are carried over to seven player forms for them to fill out. That data writes to google sheets, and then is redisplayed on another section of the site. Its a very complicated tournament. Its like two layers of fantasy football stacked on top of eachother where a manager changes a team around and then each team member can change their game selections.
The only way i have made this work, and it has been working, is each team gets their own dedicated built team page. Thats why ive been duplicating forms and re-updating each reference manually.
There's got to be an easier way to design this without all the form duplication. I don't even know how you'd be able to create reports from that spider-web design. Nevertheless, I don't know of anyway to do what you want without a custom coding solution. You could try creating a custom shortcode that could be used for every form, even the duplicates. You would need to pass identifying parameters to the shortcode to ensure your pulling back the right value.
Without hands-on to your system, I'm not certain what variables you would pass or how you would retrieve the proper value. Perhaps when this tournament is over, maybe you'll consider engaging a developer o help with a more fluid design to make things easier?
Please login or Register to submit your answer