Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
I'm still on the already mentioned monster of a form/survey, but ran into another problem I just can't figure out but is probably something trivial concerning the whole logic of the thing... (btw., how do I actually access the premium support? Is the email address indicated on the bill the proper one to write to? - not that the support here is already the full deal already :D )

What I'm trying to do is to check within the success condition to check a bunch of values against each other. If they don't add up as they should create an error variable (holding something like "wrong_field_1|wrong_field_2") and after a page reload show an error message at the location using <cms:each>.

This all works as it should.

However for some reason the error variable seems to remain after the redirect, although the corrected values are properly saved into the template and therefore shouldn't throw out a new error. I need to submit the form once again to remove the error variable, which is confusing to me as it should already be gone?!

In short, the thing looks like the following:
Code: Select all
<cms:set error_msg="<cms:get_flash 'error_msg' />" />
<cms:show error_msg/>


   <cms:if k_success >
         <cms:set action="<cms:gpc 'action' />" />
         <cms:if action='Back' || action='Next'>
            /// To cut things shorter, here I'm going through the values of the bound
            editable regions and check for wrong inputs, giving me back the wrong fieldnames
            like 'name_field1|name_field4|name_field6...' as 'no_load_temperature_error'
      <cms:if no_load_temperature_error>
         <cms:set_flash name='error_msg' value="<cms:show no_load_temperature_error/>" />
         <cms:redirect k_page_link />
         <cms:set action="<cms:gpc 'action' />" />
         <cms:if action='Back' >
         <cms:else_if action='Next' />

         <cms:if "<cms:not k_persist_error />">
            <cms:redirect url="<cms:show k_page_link />" />

   <cms:if k_error >
      <div class="error">
         <cms:each k_error >
            <span style="color:red"><br><cms:show item /></span>
   <cms:if error_msg>

      ///here I output the necessary inputs as bound

         <input type="submit" name="action" value="Back"/>
         <input type="submit" name="action" value="Next"/>   


Maybe using typ=bound inputs is the problem here and I should rather do it old-style to keep things separate?

And on a connected matter, can i use something like this within <cms:db_persist_form /> ?
Code: Select all
<cms:repeat count='10'>
editable_region_nr"<cms:show k_count/>"=frm_input_nr"<cms:show k_count/>"
btw., how do I actually access the premium support? Is the email address indicated on the bill the proper one to write to?
Yes, you may drop me a mail on that address (please do indicate the licensed domain).

nothing on this? :/
3 posts Page 1 of 1

Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 10 guests