Questions tagged [mvc-forms]
Questions related to Sitecore MVC (Model-View-Controller) with the use of forms.
36
questions
0
votes
1answer
137 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
1answer
14 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">
<...
0
votes
1answer
33 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/)
...
0
votes
0answers
115 views
System.Web.Mvc.HttpAntiForgeryException: The provided anti-forgery token was meant for user “”, but the current user is “”
I'm seeing cases where the submission of a generic public facing Sitecore Form (such as a contact form) causes two variations of this issue, where either the user or current user is empty and the ...
0
votes
0answers
118 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....
-1
votes
1answer
59 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
1answer
87 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
1answer
29 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
vote
0answers
27 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 ...
0
votes
0answers
37 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, ...
2
votes
1answer
304 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 ...
0
votes
0answers
129 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
105 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
47 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
717 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
1answer
231 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
3answers
386 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
180 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
152 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
96 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 ...
6
votes
1answer
334 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 ...
1
vote
0answers
111 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
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 ...
3
votes
0answers
254 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'...
4
votes
1answer
292 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 ...
1
vote
0answers
210 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 ...
4
votes
1answer
673 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
6k 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 ...
1
vote
1answer
220 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 ...
1
vote
1answer
244 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-...
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" /&...
6
votes
1answer
801 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
3k 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 ...
5
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 ...
8
votes
2answers
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....