Re: Mixed MUSTANSWER in Custom question

Joel Palmius <[email protected]> Sun, 12 Mar 2006 11:44:32 +0100 (CET)
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
Why not simply make two or more CUSTOM fields?

<CUSTOM ESCAPED=NO VARIABLES=addr1 MUSTANSWER=yes>
<div class="component TEXT">
   <div class="caption captionCHOICE">
   Mailing Address
   </div>
   <div class="element elementCHOICE">
     Address 1 <input type="text" name="addr1" maxlength="60" size=60 /><br><br>
</CUSTOM>

<CUSTOM ESCAPED=NO VARIABLES=addr2>
     Address 2 <input type="text" name="addr2" maxlength="60" size=60/><br><br>
</CUSTOM>

<CUSTOM ESCAPED=NO VARIABLES=city,state,zip MUSTANSWER=yes>
     City <input type="text" name="city"  maxlength="30" size=30 />
     State <input type="text" name="state" maxlength="2" size=3 >
     Zip <input type="text" name="zip" maxlength="10" size=10 />
    </div>
</div>
<p class="componentspc"></p>
</CUSTOM>

This is functionally equivalent in number of variables and layout. (I have 
not tested it though).

   // Joel

On Sat, 11 Mar 2006, George Clark wrote:

>
> Hi all,
>
> (Running www-apache/mod_survey-3.2.3-r2  and Apache1 on Gentoo)
>
> To improve the layout of a survey and group fields together into a single
> "block",  I'd like the MUSTANSWER to apply to a subset of the fields.  Is there
> any way in the below example to allow the "Address 2" line to be left blank,
> but still require that the remaining fields be answered.
>
> <CUSTOM ESCAPED=NO VARIABLES=addr1,addr2,city,state,zip MUSTANSWER=yes>
> <div class="component TEXT">
>   <div class="caption captionCHOICE">
>   Mailing Address
>   </div>
>   <div class="element elementCHOICE">
>     Address 1 <input type="text" name="addr1" maxlength="60" size=60 /><br><br>
>     Address 2 <input type="text" name="addr2" maxlength="60" size=60/><br><br>
>     City <input type="text" name="city"  maxlength="30" size=30 />
>     State <input type="text" name="state" maxlength="2" size=3 >
>     Zip <input type="text" name="zip" maxlength="10" size=10 />
>    </div>
> </div>
> <p class="componentspc"></p>
> </CUSTOM>
>
> Thanks,
> George
> Skickat av "George Clark" <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion