Specify wufoo redirect url in form field - wufoo

I want to create a single wufoo form, and embed the form inside my own web pages.
WuFoo has a way to define the redirect URL within their GUI, but I want to make the redirect dynamic based on the REFERER value of where the wufoo data was posted form.
This will allow me to dynamically redirect back to a specific web site based on where the form data was entered.
Does anyone know if there is a way to specify the redirect url in a hiddent form field?
I know that I can create separate forms to accomplish this, but I want all of the entered data to be received in one wufoo form.
There doesn't appear to be any way to access the HTTP_REFERER value in WuFoo's form rules, so I don't think trying to use rules will work.

Apparently there is no way to specify the return url in a form field (according to wufoo tech support).
But you can include hidden fields and use wufoo's rules to return to a URL based on those hidden fields.
In the end, I added code to wordpress's index.php to deal with this.

Related

Separating redirection logic in angular pages

In my application we have a summary page having a link to take the user to the different pages of the application. For example, we have separate pages for collecting personal details, address details, education details etc., and there is a summary page giving the summary of a student's data. Users of the application will go to the summary page and then navigate to any individual pages in case if the data is not filled up yet. After the user goes to the individual page, they can enter the required details, and upon saving the entered details, they will be eventually redirected back to the summary page.
I have implemented the above functionality as below at the moment,
When the user clicks on a link to the address details page from the summary page, I will pass the redirect url as a query string to the summary page, and upon the user saves the address details in the address page, I will redirect the user back to the summary page using the redirect url passed on the query string.
Each individual pages have a common base class
Redirection logic is present in each individual pages now. This logic checks if there was a redirection url present in the query string, then if present it will direct the user to the summary page after the user clicks on the save button on the current page.
I feel the above solution is elementary, there is potential for adding new pages to our application.
I wonder if there is anyway to implement the above requirement in a elegant way in such a way that the redirection logic is separated as a angular service, route or any other angular technique so that we dont have to do any thing extra for the new pages that will be added in the future.

Redirect .htaccess to different page on different domain

I tried searching for similar posts but none of them satisfied my need. Hence I have to ask a new question
I have some domain space on my university website like this <university>.edu/~<myname> which is actually <university>.edu/~<myname>/index.html
I want all the traffic from here to go to <myname>.wix.com/resume. But I don't want other pages like my <university>.edu/~<myname>/somethingelse to redirect anywhere.
Also I want the address bar to still show <university>.edu/~<myname> even when it has readirected to my site on wix.com.
Kindly let me know if this is possible.
Thanks in advance.
No browser that I know of will allow itself to be redirected to a different site, without displaying the URL of the new site in the address bar. However, there are ways that you can display content from <myname>.wix.com/resume on your page at <university>.edu/~<myname>/index.html. One way is to use a frame (or an iframe) on <myname>.wix.com/resume which would load content from <university>.edu/~<myname>/index.html. Another (perhaps more seamless) solution would be to use a server-side scripting language (such as PHP) to create a script at <university>.edu/~<myname>/index.php which would download the content 'on the fly' from <myname>.wix.com/resume and display it at <university>.edu/~<myname>/index.php.

fixed url on address bar - show only base url http://www.mysite.com

I need to show on the address bar just the first part of the url of my site.
For example for any page with name like
http://www.mysite.com/mypage.php or
everything else
I want to see just http://www.mysite.com on the address bar of the browser.
How this can be achieved?
I tried with apache RewriteRule but with no result.
Apart from being a really bad idea for people actually trying to use your site, there is no way you can do this on the server side, because the server needs to know which page was accessed - that's what a URL is for. What you are looking for is to make it appear to the user that they are still at the same URL.
This is easy enough if you put your entire site in an HTML frameset with one frame, or an iframe sized to fill the browser window. This does require all external links to have target="_top", and without additional JS people can break out of the frame and access the pages individually anyway.
An alternative approach, that will only work on some browsers, would be to use history.pushState to fake the address bar back to / every time a new page loads.

PrestaShop - Reload CMS page with additional parameters

Situation: I needed to add form with POST method to CMS page. I created custom hook and a module displaying the form successfully. Then I need to react to user input errors eg. when user doesn't enter email address I need to detect it, display the whole page again together with the form and with "errors" in user input clearly stated.
Problem: The problem is to display the WHOLE page again with connected information (eg. about errors etc.). In the module PHP file when I add this kind of code,
return $this->display(__FILE__, 'modulename.tpl');
it (naturally) displays ONLY the form, not the whole CMS page with the form.
In case of this code,
Tools::redirectLink('cms.php?id_cms=7');
I can't get to transfer any information by GET neither POST method.
$_POST['test'] = 1;
Tools::redirectLink('cms.php?id_cms=7&test');
I tried to assign to smarty variables too
$smarty->assign('test', '1');
(I need to use it in .tpl file where the form itself is created) but no way to get it work.
{if isset($test)}...,
{if isset($smarty.post.test)}...,
{if isset($_POST['test'])}... {* neither of these conditionals end up as true *}
Even assigning a GET parameter to url has no impact, because there is link rewriting to some kind of friendly url I guess, no matter I included other argument or not. ([SHOPNAME]/cms.php?id_cms=7&test -> [SHOPNAME]/content/7-cmspage-name)
My question is: is there a way to "redirect" or "reload" current page (or possibly any page generally) in prestashop together with my own data included?
I kind of explained the whole case so I'm open to hear a better overall solution than my (maybe I'm thinking about the case in a wrong way at all). This would be other possible answer.
The simplest method would be to use javascript to validate the form - you can use jQuery to highlight the fields that are in error; providing visual feedback on how the submission failed. In effect you don't allow the user to submit the form (and thus leave the page) until you're happy that the action will succeed. I assume that you will then redirect to another page once a successful submission has been received.
There's lots of articles and how-tos available for using javascript, and indeed jQuery for form validation. If you want to keep the site lean and mean, then you can provide an override for the CMS controller and only enqueue the script for the specific page(s) you want to use form validation on.
If the validation is complex, then you might be best using AJAX and just reloading the form section of your page via a call to your module. Hooks aren't great for this kind of thing, so you might want to consider using an alternative mnethod to inject your code onto the cms page. I've written a few articles on this alternative approach which can be found on my prestashop blog

Friendly url with floating count of form parameters

I have form with checkboxes. Afrer submit url looks like:
www.site.com?mod[]=1&mod[]=2&mod[]=3
How to rewrite url above (apache mod_rewrite) into:
www.site.com/mod:1,2,3
Big problem is that i don't know how many checkboxes will checked
Using just mod_rewrite, I cannot see a way to do this, however, using RewriteMap, you could link to an an external script that would take the query string and return the appropriate new url segments. Then invoke the defined map (program) in your RewriteRule.