drupal Webform Issue - drupal

I have created a tpl file for render the webform node.webform is working fine but after submit it returns to same page rather than goto thanks page. i want to redirect the action to thanks page.

You can actually create your own page that you want your users to be directed to after submitting a webform, and provide whatever links you like on this page. To do this, edit the webform and go to Form Settings. Under Submission Settings, click Customize Confirmation and choose "Redirect to a different page" from the jump menu. Under path, provide the path to this page that you've created.

Related

Drupal webform form action

I'm adding a form to a Drupal website. I've created a new page, and created a webform, the webform has been assigned to the page content as a block.
The problem I'm having is when submitting the form, instead of showing the errors of the form at the top of the page like the rest of the forms do, the form action is set to the individual web form page, and any styling/content blocks disappear.
Essentially what I need to do is ensure the form posts to the same page, if I edit the form action in dev tools, the errors show fine at the top of the page.
EDIT: Should also add - I've setup the page and wbeform as per all the others, and they all function as they should and post to the same URL as the page.
Any help appreciated.
Thanks
If you are using the Webform module then you can go to the configuration page of the block in the 'Blocks' section, and look for the following checkbox:
Show all webform pages in block
The description under the checkbox tells you that anything that has to do with the webform (includes errors) will be shown on the current page, instead of redirecting you to the original webform page:
By default multi-page webforms redirect to the node page for all pages after the first one. If checked, all pages will be shown in the block instead.

Drupal How to change access denied / login page for one protected page

I have one page ( a view page ) where I need the user to be logged-in in order to see it. But the default login page seems overly harsh and would want to a friendlier page in page stating the need to sign up to see this portion of the website.
My quick thought was the create a module that put a hook in for this particular page of the site. But I am not sure that this is the best way.
If by 'friendlier' page you mean some text stating need to "sign up to see this portion of the website", it would be better to
either
use hook_form_alter to add a markup field for text
http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#markup
or
simply create a block and set its visibility to [show only on following pages] : "user/login"

ASP.Net Load Data from another page

i am facing one problem..
I have a page which has some templates related to user..
User use this template to send email..
User can have option to save this template and then he can load the saved templates...
What i want is on click on "Load Template" link. a new page appears which will display all the saved templates for logged in user. this page can contain grid. on select i want to close this load template page. and pass the text data back to previous page. which will display this template into text field. so that user can use saved templates.
How to do this using Asp.Net
You can do this using JavaScript, assuming the template selection window is opened with a call to window.open(). When the template is selected you can communicate and invoke methods (such as passing back the selected template ID) with code similar to this:
window.opener.templateSelected(selectedTemplateID);
window.close();
Here is information about window.opener
I believe that this may be what you're looking for. It's pretty straight forward and is in C#. It is done in .Net as opposed to client side JS.

asp.net mvc Upload File ajax

Hi ive got an mvc form with a fileupload functionality. Ive got an action that accepts an file and extracts thumbnails from it, after which the user can select the images and then proceed to submit the form. How can post the initial file via ajax, bearing in mind, this is not the final submission on the form and I want to retain user input. ie no postback
Thanks
I use the ajaxupload plugin for jQuery. Lots of sample code is provided on the site. From the site:
[The] plugin creates invisible file input on top of the button you provide, so when user clicks on your button the normal file selection window is shown. And after user selects a file, plugin submits form that contains file input to an iframe. So it isn’t true ajax upload, but brings same user experience.
Browsers don't allow the uploading of files via ajax. There are several good workarounds, however.

How to translate content page in a master page after language change (ASP.NET)

I have a content page in a master page in ASP.NET.
What is going on is that the user click on a button in the right corner of the master page and that change the current language. What does the button is changing the Session for the new selected language.
What is happening is that when you click on a button, the code is executed AFTER the Page_Load of both the master page and the content page is called. But in my button, I call a function "Translate" that do the translation of the master page.
Unfortunately, I don't know what to do for the content page. I tried to do a manual reload of it but I don't know how.
Is there anyone here that can help me? I don't think that code is needed here but if it can help you, just ask me what you need and I will update.
Thanks
Jaff
After changing the users language settings (both on the thread and where ever you persist that information too) do a Response.Redirect to the page they are already on. This allows for a clean page load and reduces the chance that other culture specific settings will cause a problem (such as date and time selections.)

Resources