I have found your tutorial on the repeat form to be very helpful.
However I have a question. In my scenario, I need to save the data to the session manager first. The way I have built the form is to create the steps by hiding and showing the next set of questions once the info has been saved to the session manager. I am doing this because I am not saving it to the serverside. Once all the info has been placed into the session manager, the submit button is pressed, the API call happens and the response is sent back and viewed on the page.
My question is the following, when I have the repeat form and the step 3 button is pressed, it does not save the info in the fields to the session manager. On the simpler form, it would save it to the session manager.
So now my issue is that it does not display the info in the review your info tab.
I have selected the dynamic data field and stated I wanted the value of the session. but is comes back as object.
the way I have it set up right now, it will not place the values into the session manager.
see the video
Screen Recording 2023-02-28 at 8.01.55 PM
they only way I can get anything from the repeat form to show up in the session manager is to set the session to Items. See the video. But when I do that I cannot just grab the value that is needed.
Screen Recording 2023-02-28 at 8.04.31 PM
If I do items it is sending over everything, just too much info.
<div class="d-flex flex-row align-items-center">
<h6 class="cal2 cal6">Total amount of miles driven per year</h6>
<p class="cal2 cal7">{{session1.data.value.OverallVehMilesPerGallon.flatten('value')}}</p>
</div>
<div class="d-flex flex-row align-items-center">
<h6 class="cal2 cal6">Estimated vehicle miles per gallon</h6>
<p class="cal2 cal7">{{session1.data.OverallVehMilesPerGallon.flatten('value')}}</p>
</div>
Probably won’t work, but session1.data.value.OverallVehMilesPerGallon seems to be an array, so you need to merge the values of each one? Unsure of the exact syntax
You’d need to play a lot with dmx.parse() to evaluate the expressions till you get them right
<div class="d-flex flex-row align-items-center">
<h6 class="cal2 cal6">Total amount of miles driven per year</h6>
<p class="cal2 cal7">{{session1.data.value.OverallVehMilesPerGallon[0].$value}}</p>
</div>
<div class="d-flex flex-row align-items-center">
<h6 class="cal2 cal6">Estimated vehicle miles per gallon</h6>
<p class="cal2 cal7">{{session1.data.value.OverallVehMilesPerGallon[1].$value}}</p>
</div>
The first value will show the overall vehicle miles per galon of the 1st vehicle. The second value will show for the 2nd vehicle. This is just to test if it works
But I have a feeling this is sort of a hacky way you’re doing the insertion into the session data, it might break if Wappler changes something
Regarding dmx.parse I guess you’ll have to search the forum to see random posts mentioning it
nope, Should I be pulling the data into the backend and then once all the data is captured have an API call happen that then send the data and then I display it? I was trying to avoid any use of another database. But if its Hacky I must be approaching this in the wrong way.