Hello i have a view (you can look at here: hidden link )
My view is not using ajax (because i would like to use amp in a while)
I would like redirect to a row when visitors click on submit button, so i basically want to add "&#myrow" to parameter url when they click on.
I opened a while ago same ticket (https://toolset.com/forums/topic/add-url-parameter-on-views-submit/#post-1672009 ), greatly resolved from Christian Cox but using javascript.
If possibile i prefer to use php, but i can't find correct hook to use on views search submit to manipulate my url address.
Thanks!
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
Thank you for getting in touch.
Given that we don't have a hook to actually do this then you will need to use Javascript to add the url parameter after the view search has been submitted.
If we had a hook that allowed for the view url query modification then it would be possible.
Thanks,
Shane
Ok Shane and thanks for your reply, could be a feature request?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
I can try to put in the request but I can guarantee that this one will be a low priority feature as users don't normally pass custom URL Parameters in views.
However I thought of an Idea, perhaps you can create and empty input tag with HTML line
<input type="text" id="fname" name="fname" value="my-value">
Given that the search are is essentially a form, it may add the fname parameter to the URL.
Thanks,
Shane
Hello Shane using "empty input tag with HTML line" i can add fname to url, but how can i use it to redirect to anchor link on views submitting?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
I'm not sure what you mean by redirect to anchor link on views ? Is it that you want the view to scroll to a point ? Can you provide a little more details for me and perhaps an example ?
Thanks,
Shane
Hello Shane, yes i want the view to scroll to a point set from a anchor link. A example:
1. the user go to website: hidden link
2. the user click on views search button
3. url address url would be for example: "hidden link "
In this way the user would redirected to top part of the page and should to scroll up to search results. So i'd rather the link was
"hidden link "
So basically i would to append "&#italian-language-course-search-result" to url address when user submit a search.
If possible i would to use php to do this.
Also your idea could be good for me (create and empty input tag with HTML line) but i can't find a way to use it for my needs.
Thanks
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
I did a quick search for this.
You should be able to find some help with this in the link below.
https://stackoverflow.com/questions/35090139/using-a-parameter-in-url-to-scroll-to-div-mimicking-an-anchor-behavior/35092690
This should provide exactly what you need to get this working.
Thanks,
Shane