Im working in Doc2Form. In the form I have dropdown so my customers can select from and then I whant to pressentage the selected text on a webbsite, but I just get the value who is just a number.
How do I get my cusomers selected text from my dropdonlist??
In the source code you will need to tap into that field and use getprevalue method take a look at my hacked version http://www.box.net/shared/mdddu1cu5g i do get prevalue you could use that source code or use my version that said mine is quite different from the original.
mis understood your question in my code the email which can be sent out resolves drop down values from ids to values, if you want to show value on a page you need to use the umbraco.library.GetPreValue method this can also be used in xslt
Not sure your setup exactly with Doc2Form, but if you can use GetPreValues, and you can get the ID of the one selected, you should be able to translate it using something like this
Why don't you know what the customer selected from the dropdown? Isn't this happening after they submit/publish? I was thinking you were able to get the number (prevalue ID) according to your first post.
Get the kontent from Dropdown list?
Im working in Doc2Form. In the form I have dropdown so my customers can select from and then I whant to pressentage the selected text on a webbsite, but I just get the value who is just a number.
How do I get my cusomers selected text from my dropdonlist??
In the source code you will need to tap into that field and use getprevalue method take a look at my hacked version http://www.box.net/shared/mdddu1cu5g i do get prevalue you could use that source code or use my version that said mine is quite different from the original.
Regards
Ismail
Is that really the only choise I have??
Can´t I then just du I small changes in Doc2Form source code? If so, how then? Is it difficult?? I really have to solve this.
Cuz if I install your packe I have to do everything from beginning.
Ismail if I use your package, can I install it and over-right my Doc2Form I allready have installed, and use it with everyting I allready build upp??
Best regards,
Kaj
Worth a try however make sure you take a back up of everything so you can roll back.
Regards
Ismail
It seems to work :))
So how do I do I do now to get the text in the dropdown?
mis understood your question in my code the email which can be sent out resolves drop down values from ids to values, if you want to show value on a page you need to use the umbraco.library.GetPreValue method this can also be used in xslt
Regards
Ismail
I try this:
<xsl:value-of select="umbraco.library:GetPreValues('1486')"/>
But then I get all PreValues in hole DropDown? I just whant to get out current PreValues in dropdown when it publich it?
Regards,
Kaj
I have google a lot now!!
Is it really no way to get current PreValue from a dropdownlist in backend to display in frontend??
Hi,
Not sure your setup exactly with Doc2Form, but if you can use GetPreValues, and you can get the ID of the one selected, you should be able to translate it using something like this
Where $mySelectedValue variable contains the currently selected prevalue ID
-Tom
Ok thanks Tom!
But I need to know and get out currently selected prevalue without knowing what the customurs choosed in the dropdown?
I need simple to get the selected value in dropdown?!
Regards,
Kaj
Why don't you know what the customer selected from the dropdown? Isn't this happening after they submit/publish? I was thinking you were able to get the number (prevalue ID) according to your first post.
I don´t know cuz it going to publich on the webbsite direktly after submiting.
I solved it in the end.
Here is the solution if anyone else would face the same problem:
<xsl:variable name="myID">
<xsl:value-of select="myDropDown"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$myID = '19' ">
myProduct1
</xsl:when>
<xsl:when test="$myID = '20' ">
myProduct2
</xsl:when>
<xsl:when test="$myID = '21' ">
myProduct3
</xsl:when>
<xsl:otherwise>
Anything
</xsl:otherwise>
</xsl:choose>
Best regards,
Kaj
is working on a reply...