Questions tagged [mvc-forms]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
42 views

How to support glass model properties in MVC form validation

I am attempting to build an MVC form that uses ajax to post to a controller action which will return one of 2 partial views depending on the model state, and then perform a partial page update via ...
4 votes
1 answer
360 views

Is it possible to use Custom Form Elements in JSS? If yes, how?

We are trying to include Sitecore Forms in our React Application using JSS. We're able to include regular forms, but when trying to use custom form elements using the design of the customer, we get an ...
  • 51
1 vote
0 answers
251 views

Sitecore Forms not loading on first load

We have created Polls for our application using Sitecore forms. The rendering we have created to load the poll have set of personalization rules. On first load, form is not loading. Instead it throws ...
  • 157
1 vote
1 answer
232 views

Ajax Begin Form Api Route is different in 10.1

I'm using XP 10.1 & XC 10.1 The following way used to work in earlier versions of XP. using (Ajax.BeginForm("SaveContactUsFormData", "ContactUsForm", ...
  • 2,713
1 vote
1 answer
395 views

Redirect to a Sitecore Item or Page with ViewModel?

I want to pass a ViewModel to a Sitecore Page from a Controller Action. So far this below post Link has helped, but I'm not able to pass a model to the page. I'm calling the controller from a Form ...
0 votes
1 answer
451 views

Sitecore forms custom field override validation error message

I have added a RichtextCheckbox custom field in Sitecore forms. I have added validation and it's working fine. This is the razor code <label class="@Model.LabelCssClass"> <...
user avatar
1 vote
1 answer
618 views

Sitecore form's custom field not saving in database

I have created a custom field "RichtextCheckbox" in Sitecore forms after following this tutorial (https://pushpaganan.home.blog/2020/02/06/adding-a-custom-rich-text-field-to-sitecore-forms/) ...
user avatar
0 votes
0 answers
437 views

Error when trying to Create a new form using Sitecore 9

On clicking Create new in Sitecore Form getting the below error: Message: /formbuilder/load?id=&sc_formmode=new&sc_formlang=en&sc_site=shell&_=1597294914778StackTrace: at Autofac....
  • 477
1 vote
1 answer
566 views

Modify Sitecore form default submit action

I'm using Sitecore 9.1 and SXA 1.8, I created Sitecore form with submit button, I want to disable the button after certain amount of submission attempts, the logic conditions won't work, how can I ...
0 votes
1 answer
35 views

Get Sitecore From submission attempts

I'm using Sitecore 9.1 and SXA 1.8, I created a simple Sitecore form with submit button, I want to disable the submit button after certain count of submission, Is it possible to achieve this in an OOB ...
-1 votes
1 answer
181 views

Setting error message from Sitecore when using MVC form

I am using MVC form in Sitecore. In order to validate fields i am using attributes over model fields. My requirement is to get the error message from Sitecore instead of hardcoding it. I am currently ...
0 votes
0 answers
92 views

How to make report of form saved data in Sitecore 9.3?

I have created a form in the site experience platform, and my form data is saving in sitecore_ExperienceForms database, How can I create a report with filter functionality in Sitecore 9.3. Anyone, ...
  • 21
2 votes
1 answer
569 views

Setting up a basic contact form with Sitecore JSS (not using Sitecore Forms)

I'm building a JSS App and need to set up a basic contact form (sends an email). Since I'm using Sitecore 9.1, Sitecore Forms is unavailable in JSS. How do I set up an endpoint in Sitecore to send ...
  • 123
0 votes
1 answer
276 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: ...
  • 407
2 votes
0 answers
30 views

Issue with WFFM form being created in "en" language instead of specified language

I have the following scenario: I have installed Sitecore 8.2 update 7 I have installed WFFM module I am trying to add an MVC Form rendering into a layout details of a page that I have opened in ...
  • 21
0 votes
0 answers
238 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 ...
  • 131
0 votes
1 answer
202 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 ...
  • 229
0 votes
0 answers
56 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
1 answer
1k 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
1 answer
412 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 ...
2 votes
3 answers
664 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
1 answer
208 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
0 answers
174 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 ...
  • 11
3 votes
1 answer
136 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 ...
  • 649
1 vote
0 answers
188 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
1 answer
372 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
0 answers
285 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'...
2 votes
0 answers
259 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 ...
  • 21
6 votes
1 answer
2k 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 ...
7 votes
1 answer
7k 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
1 answer
342 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 ...
  • 430
4 votes
1 answer
729 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
1 answer
899 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 ...
  • 941
2 votes
1 answer
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 ...
  • 61
1 vote
1 answer
4k 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 ...
  • 2,713
1 vote
1 answer
276 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-...
5 votes
1 answer
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
2 answers
2k 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" /&...
  • 367
9 votes
2 answers
4k 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....
  • 367
1 vote
1 answer
292 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 ...