Survey Form Problem

I have a survey form whose results post back to a .CSV form.
My problem is that if someone does not answer all of the questions
(and none are mandatory), the answers end up in the wrong columns.
Questions are answered such as:
<input type="radio" name="RadioGroup1" value="5">5
<input type="radio" name="RadioGroup1" value="4">4
<input type="radio" name="RadioGroup1" value="3">3
<input type="radio" name="RadioGroup1" value="2">2
<input type="radio" name="RadioGroup1" value="1">1
<input type="radio" name="RadioGroup1" value="na">na
Also on the form are checkboxes and a text field. What do I
need to add that will report a blank answer if a radio or checkbox
is not answered? If it helps, following is the code for the form
that processes the answers:
Dim datafile, redirectpage
datafile=Request.Form("filesave")
redirectpage=Request.Form("redirpage")
Dim fso, f
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set f=fso.OpenTextFile(Server.MapPath ("myfile.csv"), 8,
True)
f.WriteBlankLines(1)
f.WriteLine "Date : " & CStr(Date)
For Each field in Request.Form
If field<>"filesave" And field<>"redirpage" Then
f.WriteLine field & " : " & Request.Form(field)
End If
Next
f.WriteBlankLines(1)
f.Close
Set f=Nothing
Set fso=Nothing
Response.Redirect "thankyou.asp"
Thanks in advance for your help on this!

bake01 wrote:
> I have a survey form whose results post back to a .CSV
form. My problem is
> that if someone does not answer all of the questions
(and none are mandatory),
> the answers end up in the wrong columns.
Your problem is due to the way radio buttons and checkboxes
work. If
nothing is selected in a radio button group or a checkbox is
left
unselected, it doesn't appear in the form data. So, if the
user selects
nothing in RadioGroup1, RadioGroup1 doesn't have a blank
value, nothing
is passed to your script.
One approach with radio buttons is to set "No answer" as the
default by
inserting checked="checked" in the <input> tag. That
way, you will
always get a value from a radio button group: the default "no
answer" or
whatever the user selects.
You can't do that with checkboxes. Basically, you need to
check your
form data array to find if there's a value for each checkbox.
If any
checkbox is missing, you need to insert a "no answer" value
in the array
at the appropriate point. I could write a script to do this
in PHP, but
not VB Script. In pseudocode, it would go something like
this:
if (length of form array is not equal to maximum possible
answers) {
if (checkbox A not in form array) {
insert '' in array at appropriate position
if (checkbox B not in form array) {
insert '' in array at appropriate position
process form data as before
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Acrobat 9 Pro form problem

    I've created a form in Acrobat 9 Pro Extended and it works well. It's a survey form. The problem is when I set the form using "Extend Features with Acrobat Reader", the reader version of the form "remembers" past entries for fields which require free form entries. I've tried using "Clear Form" and then saving the document as another version, but when I open it up with Reader, and I click on the free form fields, I get a drop down of previous entries into those fields.
    So, how do I clear this information out of the Acrobat file once and for all?

    Is it tunred off for the Reader installation or in your Acrobat installation. It doesn't matter what your Acrobat settings are when it's used by someone else with Reader.
    Recent versions of Acrobat/Reader do not cache form data in the way mentioned by GKaiseril. This used to happen when a form was viewed in a browser.

  • Survey Form Porlet not show

    Hello,
    I am trying to publish a survey in Oracle Portal (Version 10.1.4). After a bit of Research I added the Survery Creator Portlet to a Portlets Region of a Page, and designed the Survey. This wasn't a problem.
    Afterwards, I added Survey form portlet in a Page, also in a Portlet region. In Gaphical view, the Survey was show correctly, and I could navigate the wizard to complete the Survey.
    But when I go to the Page Preview the Survey is not shown, it's not visible. (Also when a client navigate through it, the survey is not visible)
    I checked all the objects that can change the viewing permissions, Page Groups, Templates, Pages, Providers, etc... but all seems to be correctly set. I searched through this forum for a similar problem didn't find any workaround.
    Can anybody put some light on this?
    Thanks in advance
    Regards NaN
    Edited by: user13024209 on 18-ago-2011 8:27

    Hi,
    You might want to verify if this only happens with the survey portlet. For example, try to add a different portlet to the page (like a html portlet or form portlet), and then view the page and verify that the portlet is displayed. If other Portlets are also not displayed, you may have a caching or invalidation issue.

  • Smart Form problem with address layout

    Hello everyone,
    I need your help please for a smart form problem. We need the address layout for great britain with street1, street2 etc. but currently street2 is alligned before street1.
    We are using the FM ADDRESS_INTO_PRINTFORM (SAP standard address node) and according to the documenation the layout for GB is different as we see it currently.
    We have checked the sold-to and all contact persons, they have as country GB and language EN maintained.
    In customizing for address screen layout there is nothing chosen (tested to set up Europe, but did not change anything).
    For the customizing 'specify my countries...' we have maintained GB as country with the address layout key 006, vehicle country key GB and language key EN.
    For the described setting shouldn't there be designed the address in our smart forms according to 006? Anyhting in customizing we missed?
    Thanks a lot for your answers.
    Torsten

    Hi,
    Try to use line priority of FM, below is a brief of documentation. You can read it more in FM documentation:
    Control Parameters
    See also the parameter documentation.
    ADDRESS_TYPE - Address type (from 3.0C)
    There are three types of address:
    Address type '1': addresses of firms or organizations; the address
    structure which is used in most SAP applications as 'Address'.
    Address type '2': address of a person
    Address type '3': work address, usually the address of a contact person
    in a company
    The default value SPACE for the address type is handled like type '1',
    and is needed for the upwards-compatibility of the function module.
    Which parameters are used for which address type is explained in the
    ADDRESS_TYPE parameter documentation.
    The three character "address layout key" of the recipient country (LAND1) controls which of the available country-specific routines is used to format addresses for the country in question. This key is stored in field T005-ADDRS and is entered in Customizing under Global settings -> Set countries -> Define countries, on the detail screen under "Address layout key".
    Keys for customer routines in the SAP enhancement SZAD0001 can be
    maintained via the transaction SM30 (extended table maintenance),table
    name T005A, in the customer name range, and be assigned in country customizing.
    The address attributes are passed in the structures ADDRESS1 (type 1), ADDRESS2 (type 2), ADDRESS3 (type 3) or ADRSWA_IN (type SPACE).
    NUMBER_OF_LINES (ADRSWA_IN-ANZZL)
    The number of lines available for the address layout. If the number of
    lines is not sufficient for the complete layout of an address, then
    lines are consecutively suppressed according to the rules of the country in question. Use the parameter LINE_PRIORITY (ADRSWA_IN-PRIOR) overrules the standard sequence in which the output lines are to be suppressed.
    LINE_PRIORITY (ADRSWA_IN-PRIOR)
    If not equal to SPACE, this field overwrites the standard sequence in
    which the lines are suppressed if the available number of lines ANZZL is
    insufficient.
    The standard sequence is defined as follows:
    Type 1:   'AP43HRT7I86LC2BS5O'       (GB:  'APRT4327I86CBS5LO')
    Type 2:   'APHRT7I86LCBS5O'          (GB:  'PRT7I86CBS5LO')
    Type 3:   'APF43HR7I86TLC2BSND5O'    (GB:  'APRT4327I86CBS5LNDIO')
    where (if they occupy a line of their own):
    A = Title
    P = Mandatory empty line 1
    F = Function of the contact person in the company
    4 = Name 4
    3 = Name 3
    H = Different city
    R = Region
    T = District
    L = Name of country
    C = Postal code
    T = District
    7 = Street 3 (field STR_SUPPL2)
    I = Street 5 (field LOCATION)
    8 = Street 4 (field STR_SUPPL3)
    6 = Street 2 (field STR_SUPPL1)
    L = Country
    C = Postal code
    2 = Name 2
    B = PO Box
    S = Street or PO Box
    5 = c/o name
    N = Name (and title) of a person
    D = Department
    O = City
    Which of these attributes are available for maintenance can vary. All
    fields exist in Business Address Services.
    STREET_HAS_PRIORITY (ADRSWA_IN-WAREN)
    'X': Street has priority over PO Box (delivery address for example)
    ' ': PO Box has priority over street. This is the default value.
    regards,

  • Muse CC 2014 contact web forms problems

    Hi I recently created a website using muse cc 2014 and I uploaded it to the hosting server a free one at freehosting.com I set up everything I know of and when I uploaded the site using muse it gave a error message saying something about PHP mail??? I setup the mail account for my admin user and entered that in the muse contact form. If I test the contact form I do not get the messages and I even added a email to have it forwarded to my yahoo account. If I go in my email account and enter the hosting email account I however do see the message on the server's webmail page and it gets forwarded to the email I set to be the forward email. I checked everything and I'm really confused as what needs to be done. I also submitted a ticket asking customer service they have yet to respond. To note I'm using a free hosting company as it's just a personal website that I don't need all the fancy stuff just the basic needed components to make it work. my website does show up and the pages work EXCEPT the contact form which is needed and important. I ran the script and this is the results
    PHP Version - OK
    mail configured incorrectly
    SQL configuration problem
    The last two  items I really don't understand what is the problem
    Im using Cpanel and here is some basic info on the  host server. Please help me. Thanks
    Hosting package
    Free Website
    Server Name
    customers
    cPanel Version
    11.44.0 (build 16)
    Theme
    x3
    Apache version
    2.4.9
    PHP version
    5.4.26
    MySQL version
    5.5.37-cll
    Architecture
    x86_64
    Operating system
    linux
    Shared IP Address
    Path to sendmail
    /usr/sbin/sendmail
    Path to Perl
    /usr/bin/perl
    Perl version
    5.10.1
    Kernel version
    3.14.3
    cPanel Pro
    1.0 (RC1) 

    What would be the fix or proper setup for the "SQL configuration problem?" I too am having form problems on a third party host, and after checking the PHP diagnostics, the "php version" reads ok, the "mail configuration" is ok, but the SQL configuration is not.
    I guess I just need to know what I need to communicate to the hosting administrator about the SQL so they will configure it properly.
    Thanks

  • Can the 1-5 numbering system in the survey forms add up column results automatically in form central

    Can anyone help me and say whether  the 1-5 numbering system in the survey forms can add up column results automatically and show totals  in form central

    > The message in the event log states to enable "Enable Journal Wrap
    > Automatic Restore" but I found a KB article that says to use the
    > BurFlags key instead.
    http://support.microsoft.com/kb/290762
    >
    > Should I run an authoritative restore since I don't have another domain
    > controller with a good SYSVOL?
    The automatic restore process AFAIK will initiate a D2 restore. And if
    there's no other DC, sysvol might be gone.
    I really would prefer to have control - this means I would do a D4.
    Absolutely I would :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Survey Form at item level is not visible

    Hi Experts,
    I have created two survey forms for lead. I want different survey form based upon item category.
    But, In my Lead transaction NO survey form is visible at item level. its visible at header level only.
    I want it at item level.
    Please help.
    Regards,
    Ankush

    Have you got solution for your question

  • Incoming Survey/Mail Problem

    Hi Gurus,
    I met an incoming survey/mail problem, and need your help:
    "Survey" can be created and sent to vendor's external mail address  successfully via the "Portal --> Supplier Evaluation --> Create Survey", but the problem is, the system could not receive any incoming mails or survey results. Kindly please help.
    Thanks and best regards
    Alan

    Hi alan
    Please check SAP note :
    779972     SURVEY: Configuration required to receive emails
    607108     Problem analysis when sending or receiving e-mails
    552616     FAQ: SAPoffice - Sending to external recipients
    455140     Configuration of e-mail, fax, paging or SMS using
    Summer Wang

  • About SRM web survey form submit

    Hi, Expert
         I meet a requirtment, and I need to collect the questions from the third part web, then I need to submit the survey with ABAP code, could you give me some useful help? and I am using SRM7.0 .
        I found the class method 'On_input_processing', but I don't know how to use it and if it is useful.
    thanks.

    Hi Palaniappan
    Thanks for your reply.
    Now my old flow is: 1. The supplier fill his info by SUS(It is developed by BSP), then the system automaticlly send a mail(The mail contain a URL that lead the user to the survey form).
                                    2. After the supplier receive the mail, and click the URL to open the survey form, when he fill all needed fields, then he click the button "SUBMIT".
    my new new flow is 1. The supplier fill his info( include the survey info) in the third part web page and save the data.
                                     2. when he click "SAVE", my interface need to create a vendor with "ROS_BUPA_CREATE_PROSP".
                                     3. when I get the vendor's GUID, I need to submit the survey data.
    My question is how to submit the survey data with ABAP code without web form environment.
    Could you give me some suggestions or example!
    Thanks.

  • Survey Form

    I am trying to create a survey form where respondents rate individual factors based on their likelihood, impact, and effectiveness.  I need to be able to track the responses based on each factor.
    For example:
    Factor
    Likelihood
    Impact
    Effectiveness
    Factor 1
    Dropdown Selection for Rating
    Dropdown Selection for Rating
    Dropdown Selection for Rating
    Factor 2
    Dropdown Selection for Rating
    Dropdown Selection for Rating
    Dropdown Selection for Rating
    Is this possible?  If so, how do I create it?

    Hai are you trying any test kind from flat file source .Just get the business requirement based on your survey make it in a CSV file format as per the structure desired and then load into your survey cube.
    If from r/3 see if any standard datasources available or else get it done with ztables and then generic extraction using tables.
    Goodday.

  • Automating Survey form results to email. Thanks!

    Hi all
    I am currently doing a survey form which will automatically send the results to a specific email on the key of the submit button. I have tried writing out to a text file before but not to an email. Can anyone please help? Thanks a lot.

    Hi all
    I am currently doing a survey form which will
    automatically send the results to a specific email on
    the key of the submit button. I have tried writing out
    to a text file before but not to an email. Can anyone
    please help? Thanks a lot.I havent tested the following code and its just to give you a brief idea as how to go. Please take it only as a guideline and look at the java mail API specially
    javax.mail.internet.MimeMessage
    public String mailIt
       (java.lang.String from,
       java.lang.String to,
       java.lang.String subject,
       java.lang.String textmessage)
       String status = "Your message was sent";
       try {
       //Obtain the initial JNDI context
       InitialContext ctx = new InitialContext();
       //Perform a JNDI lookup to obtain the resource
       //reference object
       Session session = (Session) ctx.lookup("java:comp/env/mail/mymailserver");
       //Construct the message
       MimeMessage message = new MimeMessage(session);
       //Set the from address
       Address[] fromAddress = InternetAddress.parse(from);
       message.addFrom(fromAddress);
       //Set the to address
       Address[] toAddress = InternetAddress.parse(to);
       message.setRecipients(Message.RecipientType.TO,toAddress);
       //Set the subject and text
       message.setSubject(subject);
       message.setText(textmessage);
       //Send the message
       Transport.send(message);
       } catch(AddressException e) {
         status = "There was an error parsing the addresses"+e;
       } catch(SendFailedException e) {
         status = "There was an error sending the message"+e;
       } catch (MessagingException e) {
         status = "There was an unexpected error"+e;
       } catch (NamingException e) {
         status = "The mail session could not be created.";
      System.out.println("The status is:"+ status);
      return status;
    }

  • Survey forms

    I want to send a survey form to a list of people, have them enter their responses on the form and send it back to me.
    the responses will include some yes or no responses, and some narrative comments.
    I think that this is a simple process,but i have no idea about how to make it work.

    Well, you've come to the right place!
    I suggest starting here, it gives some pretty good info on the ins and outs of the product: http://forums.adobe.com/docs/DOC-2731http://
    Then, sign up for the free version to play with it a bit and see if it meets your needs.
    Hope that helps,
    Brian

  • How do I modify a survey form?

    I am trying to get my company to adopt Sharepoint in a more widespread fashion, and I was finally able to get the HR department to start using it.  One of the first things they decided to do was to set up an exit interview survey form.  Unfortunately after a big process for determining what questions would go on it, and getting it set up and ready, they have decided it's 'ugly'.
    They want me to change the spacing in questions where there are multiple lines of text on "choice" type questions (with the 1 to 5 radio buttons).  I will be the first to admit that they are not the easiest to read.  They also want me to change that stupid "Specify your own value" to something else. 
    When I am in SPD I have tried opening all of the aspx pages in the lists folder, but none of them display anything that looks even vaguely like my survey form. 
    After spending the last hour googling this issue, I have come to the conclusion that no one knows how to do either one of these.  I am hoping that I missed something obvious, and that someone here will point out the error of my ways.
    Thanks in advance for any help.
    Ted

    Hi,
    I think you can create a new page in SharePoint Designer, and then insert a custom list form on to the page. In your case, in the “List or document library to use for form” list, you should choose the survey you want; in the “Type of form to create” list, choose “New item form”.
    After you create a custom list form, you can use the WYSIWYG tools in Office SharePoint Designer 2007 to add or remove columns, change font formatting, or apply colors.
    For more information about creating a custom list form, please refer to: http://office.microsoft.com/en-us/sharepointdesigner/HA101191111033.aspx
    Xue-Mei Chang

  • Please HELP!!! Survey building problem (passing variable)

    If anybody can help I would very very appreciate this!
    The problem is that I’m trying to build a survey! In
    admin screen there is choice of questions to create (check box,
    radio, combo and comments)
    Once admin creates questions with particular radio buttons
    set, then he can add answers with radio buttons next to it.
    Then it adds all that to database.
    For users to see this survey with multiple questions and
    answers I have created form in which all this is visible. For radio
    buttons to appear I need to loop through the query which selects
    all created questions and answers. However, for radio buttons to
    appear as grouped I use name = #questionID# from query – so
    that radio buttons will be grouped for each question.
    My problem is since it is like:
    <CFLOOP query="radioCheckView">
    <INPUT type="Radio" name=" #questionID #"
    value="<CFOUTPUT>#RadioQuest#</CFOUTPUT>">
    <CFOUTPUT>#RadioQuest#</CFOUTPUT><br>
    </CFLOOP>
    Once user submits the form, all answers should be inserted
    into database.
    How then this radio button can be identified when you submit?
    <CFIF isDefined("Form.Submit")>
    <CFOUTPUT query="ViewQuests">
    <CFQUERY name="UserInsert" datasource="surveyDB">
    INSERT INTO answers
    (questID, comments, radio)
    VALUES
    #questID#,
    '#form.comment#',
    '#form.??????????? #' – “Don’t know what
    should I write here this should be a radioButton Name which is
    mentioned above”
    </CFQUERY>
    </CFIF>
    Please guys if you know how to solve this problem –
    help me!
    THANK YOU VERY VERY MUCH IN ADVANCE!

    Here is an example that answers your question. Remarks:
    1) There is, as usual, just
    one name for the radio fields. It is assigned dynamically as
    #questionid#.
    2) The radio fields have different values, also assigned
    dynamically by means of the array radioquest.
    3) When the form is submitted the dynamic value #questionid#
    will not exist on the action page. One solution is to store it in a
    hidden field.

  • Open form - close form problem

    Hi. Using JDeveloper 10.1.3.3., ADF BC.
    Simple, yet not so simple problem: I have two forms, Main and Detail (JFrame). Main form has menu item which I use to open Detail form:
    try {
    FormDetail frmDetail = new FormDetail();
    frmDetail.setBindingContext(panelBinding.getBindingContext());
    // center jframe, visible = true
    showNewForm(frmDetail);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    I want to create new instance every time I show Detail form. But I have problem closing detail form. Here is Detail constructor:
    public FormDetail() {
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    dispose();
    Here are actions:
    1) start Main form
    2) open Detail form
    3) close Detail form
    4) try to open Detail form - oracle.jbo.JboException 35001.
    I've read about this error, but I don't know how to avoid it.
    I cannot accept that I always have to use setVisible(true) and setVisible(false) on all my forms. There has to be a way to dispose of detail forms, and re-create them. Can someone please help?
    Also, read article on Re: ADF-JClient bug
    No solution there

    I have looked at it before. I am not working with MDI forms, so I cannot apply this.
    I found this article which could solve my problem, but I don't know how is "thedude" creating that Abstract class he was talking about...
    Link: Re: how to release panelbinding correctly?
    As I understood, I should release panel binding before I can release the form...
    Default behavior of detail form's window listener is Exit(0). I want to reinstantiate form every time I open it.

Maybe you are looking for