Questions tagged [mvc-forms]

Questions related to Sitecore MVC (Model-View-Controller) with the use of forms.

Filter by
Sorted by
Tagged with
0
votes
1answer
76 views

Is it possible to post back a form to rendering on another item/page?

Is it possible to post data from a form with controller rendering on page1 to a controller rendering on page2? I mean the form submit on page1 should post back with page2 as page context. Update 1: ...
0
votes
0answers
81 views

Returning a file stream from a Controller

I have pdf files in folder, I want user enable to download file, in MVC controller its quite simple as below return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, filename); but ...
0
votes
1answer
50 views

Sitecore.Web.WebUtil.Redirect not working with Ajax call

I have an Sitecore app (9.0.2) MVC application, in which I send to the Controller a FormCollection object, with an Ajax call (because I create dynamically tabs with in View). On the Controller, I ...
0
votes
0answers
32 views

Can we use WFFM rendering and MVC rendering together in same page?

We are using Sitecore 8.1 MVC application. Our one team member come across issue while using WFFM rendering and MVC rendering together in same page. When clicking on WFFM action button it is ...
1
vote
1answer
86 views

Passing encrypted form values via url parameter to thank you page

I'm quite new here so don't go too hard on me if some things might be a bit unclear. A little background info: Last week I implemented so when a form is submitted, we take all the info and encrypt it ...
1
vote
1answer
341 views

'Required if' Validation in Sitecore Forms

Is there any recommended way to configure 'Required if' Validation in Sitecore Forms? For example, field A is required if checkbox B is ticked? At the moment for most form elements I seem limited ...
0
votes
0answers
334 views

Attempt to retrieve context object of type 'Sitecore.Mvc.Presentation.RenderingContext' from empty stack Exception

I am trying to make an SXA component in which I can take a users cookie preferences, when the submit button is clicked the details from the form will be saved in a cookie so that the management of the ...
0
votes
1answer
126 views

Sitecore SXA action call a controller action

how to create a button in Sitecore SXA which would call a controller action or a rest Api ? would it be through javascript or is there an ootb feature in SXA , where i could get the user and item ...
1
vote
3answers
235 views

Sitecore 8.1 Controller Rendering Error

I am a newby and working on the Solutions Developer Course for Sitecore 8.2 online in Visual Studio with Sitecorerocks. Also just a heads up, very recently I had to rebuild this Visual Studio 2015 ...
-1
votes
1answer
146 views

Not all form elements are getting published

We have sitecore 9 forms with basic single-line texts, multi-line texts, dropdown list, radio button list etc. The form works fine in CM. But when we publish all and try to view the form page in ...
1
vote
0answers
143 views

Can we use Sitecore pipeline engine when implement a “Custom Form” on Sitecore platform?

Background We are trying to implement a "Custom Form"(not Sitecore wffm) on Sitecore platform. The form is a multiple-steps form. To make it simple, let's say 3 main steps: enter personal ...
3
votes
1answer
80 views

Auto populate few fields in Sitecore MVC custom forms

I built a custom form with Sitecore MVC, which has an email field section, however, if a user is logged in, i want the user email to be auto populated in the email section. How can i get the email ...
1
vote
0answers
72 views

How can I move validation summary on WFFM to display at the bottom of the form?

I'm trying to change the position of WFFM form validation summary in Sitecore 8.2 update 5. My form is very long and by default, the validation summary displays at the beginning of the form so the ...
6
votes
1answer
276 views

Pre-populate form fields in WFFM

I have a requirement to pre-populate fields from an external source. Is there a way to hook into a pipeline to achieve this? I'm thinking something similar to how Sitecore can populate the fields by ...
3
votes
0answers
228 views

How to stop page reloading on WFFM form when validation/save action failed?

I'm using Sitecore 8.2 update 5 with the corresponding WFFM version. When WFFM form fails validation/custom submit action failed the application is redirecting the user to a page with the form only, I'...
1
vote
0answers
179 views

Speak Form component is not working

I'm using Sitecore 8.2 to build a Speak application where I'm creating a form to add/edit items from the master database, so when I add a Form component and looking into the console of chrome browser ...
6
votes
1answer
1k views

Postback Does Not Return Full Page Layout

Sitecore Version: 8.2 (rev 170614) Glass.Mapper Version: 4.4.0.199 .NET Framework Version: 4.6 I have a Controller Rendering that represents "Redemption" form on my site that can be added ...
5
votes
1answer
5k views

How to get simple form post to work in Sitecore MVC 8.2?

I am new to Sitecore MVC and I am trying to set up a simple form post to work. First I have a content item that has a number of renderings set up in the presentation details. One of those renderings ...
4
votes
1answer
265 views

Restricted Home Page showing Layout Requested Not Found

I am having issues about redirection to a page after using the Custom Login/Logout. The scenario is, I need to redirect the user to the Custom Login page, if accessing the Restricted Page (Test ...
4
votes
1answer
607 views

Custom.css does not get loaded in Sitecore WFFM mvc

The custom.css and all other css files under Themes folder \Website\sitecore modules\Shell\Web Forms for Marketers\Themes gets loaded in web browser on vanilla version of Sitecore 8.1 update 3 but it ...
6
votes
1answer
728 views

Sitecore MVC Form Post with Area

I'm using Areas in my Sitecore MVC solution. I THINK I want to post to my form back to the same controller just like a typical MVC project (having a HttpPost attribute in my controller). Maybe that's ...
2
votes
1answer
1k views

Rendering sitecore MVC rendering on an ASPX layout

Does any one has experience implementing hybrid version of Sitecore MVC and webforms? Sitecore does support the hybrid state but at a page level, meaning either the page has to be on Sitecore MVC ...
1
vote
1answer
2k views

How to load partial view

I'm new to MVC. Trying to load a partial view but get a 500 error in browser console. After clicking on submit, the action method is triggered and the code is executed without any errors. I would ...
1
vote
1answer
231 views

WFFM form hidden state on rendering

I am working on WFFM form where I am dynamically rendering WFFM form on web page which is working perfectly fine on my local machine by using below code @Html.Sitecore().Rendering("{F2CCA16D-7524-...
4
votes
1answer
2k views

How to use the AntiForgeryToken with a custom log-in form? [closed]

There may be several forms on any given page of our site. Distinguishing between post requests from these forms is implemented using ValidateRenderingToken. There is also AntiForgeryToken / validation ...
7
votes
2answers
1k views

Sitecore Custom MVC Form with file upload, file always null

I have the following model public class VacancyDetailModel { public HttpPostedFileBase Resume {get;set; } } This is my form. @using (Html.BeginForm()) { <input type="file" name="Resume" /&...
8
votes
2answers
3k views

How do I do custom forms in Sitecore MVC?

I am trying to get a form in my MVC Controller Rendering to work. I have read these posts: https://mhwelander.net/2014/05/30/posting-forms-in-sitecore-mvc-part-2-controller-renderings/ https://ctor....
1
vote
1answer
183 views

Posting a file to a controller action in Sitecore [closed]

I want to post a file to a controller/action in my Sitecore project via a "file" input tag. <input value="choose file" type="file" id="bulk-upload"> I see examples, similar to below, online ...