Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim Smith 9 posts 29 karma points
    Jan 18, 2010 @ 09:49
    Tim Smith
    0

    Doc2Form Returning DropDown IDs not Values...

    Hi All,

    I'm running 4.0.2.1 with doc2form. I have a form with some dropdowns on it that are loaded with prevalues. Doc2Form (is sweet!) emails the results nicely but it returns the id instead of the text for the dropdown results. Has anyone solved this problem before?

    Thanks,

    Tim

  • dandrayne 1138 posts 2262 karma points
    Jan 18, 2010 @ 10:26
    dandrayne
    0

    Try using umbraco.library:GetPreValueAsString, passing in the ID from the dropdown.

    <xsl:value-of select="umbraco.library:GetPreValueAsString(1234)" />

    Although this doesn't help in the emails that get sent.

    Dan

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Jan 18, 2010 @ 10:28
    Casey Neehouse
    1

    Very easy fix.

    Search for "int key", and replace "val" in the next two lines with the word "key".

    int key = Int32.Parse(val.Trim());

    if (((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues.ContainsKey(val))
    preVal += "\n" + ((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues[val].ToString();

    should read...

    int key = Int32.Parse(val.Trim());

    if (((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues.ContainsKey(key))
    preVal += "\n" + ((KeyValuePrevalueEditor)df.PrevalueEditor).Prevalues[key].ToString();
  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Jan 18, 2010 @ 10:29
    Casey Neehouse
    0

    BTW, the file is located in app_code.

    doc2form.ascx.cs

  • Tim Smith 9 posts 29 karma points
    Jan 18, 2010 @ 10:59
    Tim Smith
    0

    Thanks Casey that's the ticket. What took you so long to answer :) Now GO TO BED! Thank you for producing doc2form, it rocks. I had looked at the source at that spot but being a VB.NET transitioning to C# type of person, I didn't mess with. Your instructions worked a treat.

    Dan,

    I realized I could use a library function but doc2form is doing the work and I wasn't sure where to inject some XSLT. Thanks for a speedy response.

     

    Regards,

    Tim

  • David 57 posts 80 karma points
    Apr 06, 2010 @ 12:51
    David
    0

    I know I must be having a brain fart here.   Originally when implementing doc2form I was able to get it to send the results of the form completed to the owner of the site.   Like 

     

    Name:  John Doe

    Address: 100 Main  Street

    etc. 

    Now I am unable to get it to do that.  I have email results flagged to send.  What am I missing that's so  simple?  

     

    Thanks

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Apr 18, 2010 @ 13:52
    Scott Hugh Alexandar Petersen
    0

    Any idea of how I can get the form to attach file to email when sending?

    Thanks Scott

Please Sign in or register to post replies

Write your reply to:

Draft