I'm having multiple forms on the same page and I only need to update on of them on submit.
Therefore I need to be able to fetch and manipulate the collection but I just can't remember how that is done using XSLT or if I would nee an extension for this?
Form results from a GET should end up in the QueryString...
Tried the RequestQueryString() method?
Though I don't think you can get the collection - only named keys...
/Chriztian
I'm just using Request() but should do the same trick, right?
My problem is that I'm having more lists, wrapped up in <select>'s - so they're rendered dynamically making the names unique like "mit-katalog-23902", "mit-katalog-9323" etc.
I need to have unique names to make sure that I fetch only the value of a specifc <select> - But I can't seem to figure on how to achieve it - the solution I was thinking about involved using the RequestServerVariables('
QUERY_STRING') in combination with using "GET" as posting method. (This was, what I could'nt remember in the first post) - But this does not seem to be the answer either.
I'm not sure the suggested would work, even though it
makes sense to me why you're thinking this way. It was a bit of what I
thought about myself. But actually it turns out to be quite simple what I
needed to do (it always is, right? :))
I needed to use POST and
then add a parameter to the action attribute containing the id of the
product and then compare the id in the parameter with the one from the
XSLT - If they match update the list with this exact product. This
triggers the actual list and not all of them, which was my problem. Just
one of those days where nothing makes sense I guess :-)
A short example on what I ended up doing...the html
Getting values from form collection using get
Hi
I'm currently have problems figuring out how I can get access to the whole form collection when using "GET" as the method.
For instance I have this
<form name="mycatalogue-1" method="get" action="">
<select name="mit-katalog-{id}">
<option value="">Vælg liste</option>
<option value="1">value 2</option>
<option value="2">value 2</option>
</select>
<input name="gem" type="submit" value="Gem" />
</form>
I'm having multiple forms on the same page and I only need to update on of them on submit.
Therefore I need to be able to fetch and manipulate the collection but I just can't remember how that is done using XSLT or if I would nee an extension for this?
Cheers
/Jan
Form results from a GET should end up in the QueryString... Tried the RequestQueryString() method? Though I don't think you can get the collection - only named keys... /Chriztian
Hi Chriztian
Thanks for your reply.
I'm just using Request() but should do the same trick, right?
My problem is that I'm having more lists, wrapped up in <select>'s - so they're rendered dynamically making the names unique like "mit-katalog-23902", "mit-katalog-9323" etc.
I need to have unique names to make sure that I fetch only the value of a specifc <select> - But I can't seem to figure on how to achieve it - the solution I was thinking about involved using the RequestServerVariables(' QUERY_STRING') in combination with using "GET" as posting method. (This was, what I could'nt remember in the first post) - But this does not seem to be the answer either.
I hope this makes sense?
Any inputs are very much welcome.
Cheers.
/Jan
Hi Jan,
I might be misunderstanding, but to get a specific input couldn't you do something like
Will you know the unique portion of the select? If not and they are each in their own form tags perhaps you could add a hidden input to store it?
Sorry if this is off base, a little confused as to exactly what you are asking :)
Thanks,
Tom
Hi Tom
I'm not sure the suggested would work, even though it makes sense to me why you're thinking this way. It was a bit of what I thought about myself. But actually it turns out to be quite simple what I needed to do (it always is, right? :))
I needed to use POST and then add a parameter to the action attribute containing the id of the product and then compare the id in the parameter with the one from the XSLT - If they match update the list with this exact product. This triggers the actual list and not all of them, which was my problem. Just one of those days where nothing makes sense I guess :-)
A short example on what I ended up doing...the html
<form name="productlist" action="?id=id" method="post">
<select name="mit-katalog">
<option value="1">List 1</option>
<option value="2">List 2</option>
</select>
<input type="submit" name="save-list" value="Gem" />
</form>
(Imagine a couple more of the above forms)
And then in the XSLT I make this test
<xsl:if test="umbraco.library:Request('id') = id">
<!-- update code goes here -->
</xsl:if>
I hope the above makes sense - really relieved to get it solved though :-)
/Jan
is working on a reply...