How to Write a Transformation for an Alternative Form

Mike Bilz asked on June 28, 2017 21:15

Hello Kentico Team,

I have an Alternative Form connected to a User Contribution Web Part. This alternative form has additional fields which do not appear in the standard form.

How do I access these additional fields within a transformation?

When I write an Eval like <%# Eval("MyCustomField", true) %> it returns nothing.

Is there a special declaration or piece of code I need to add? or is this Alternative Form data not actually stored anywhere?

Thanks.

-mike

Correct Answer

Brenden Kehren answered on June 28, 2017 22:16

Understood now Mike. I thought you were using an actual Form within your page type.

For this, if your alternative form has a field in which the actual page type does not, that data is not being stored in the database. So what you need to do is create that field in the main page type definition and then show it on your alternative form(s) as needed.

See the screenshot below. I created an alternative form for the Articles page type and added a new field and it has this at the top of the new field "This field will be created without database representation". So go back and add it to the page type definition and not the alternative form.

Image Text

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on June 28, 2017 21:25

Sounds like you might be confusing 2 different things:

  1. Alternative forms - used for data management i.e.: insert/edit of structured data
  2. Transformations - used for displaying data from structured content

If you have a form being displayed in a transformation you still don't need to alter a transformation, you'd need to deal with your alternative form or form definition of that object (page type, class, form, etc.).

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on June 28, 2017 21:46

Hi Brenden, I may not have been entirely clear in my issue.

I have created an Alternative Form for the Event page type, which has additional fields not present in the main form.

I am creating a transformation to display Event pages, and would like to include the content of these additional fields in that transformation for events created with the Alternative Form.

How do I access the data from these fields?

Thanks.

-mike

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 28, 2017 21:59

First you'd have to have that event tied to a form somehow. Then in the transformation you'd need to perform a lookup of that form data based on that field value in the event page type. The downside of this is when you perform that API query, it will get all the form submissions and not a single one. So for that given event, you will display all the submissions for that event.

If you have that one form hooked up to multiple events, you will get all the form submissions for all the events. So not really an ideal situation; you'd want to have a new form for every event. You also need to think about performance. If you're only doing this for a single event it's probably not too bad but if you're loading a list of events and every event has to go out and get form submissions, it could cause a lot of problems.

Here are the API examples for getting online forms and their data.

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on June 28, 2017 22:09

Hi Brenden, I think we are still talking past each other.

I have a Contribution List web part, which people can use to create Event page types, using a special Alternative Form (Code Name: PublicSubmission).

The issue I am having is that the Alternative Form has additional fields which are not present in the standard form used to create a new Event.

How do I access these additional fields in my Event page transformation?

Sorry for any confusion. Thanks.

-mike

0 votesVote for this answer Mark as a Correct answer

Zachary Perry answered on June 28, 2017 22:10

You created fields in the alternative form that aren't actual fields on the page type? I am not 100% sure those field values are actually saved anywhere. I could be wrong though.

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on June 29, 2017 01:44

Thanks everyone. I've got it all sorted now, and everything is working well.

Glad to know it was just a silly mistake on my part.

0 votesVote for this answer Mark as a Correct answer

Addison adam answered on September 8, 2017 12:16

On the off chance that you have that one frame snared to different occasions, you will get all the shape entries for every one of the occasions. So not so much a perfect circumstance; you'd need to have another frame for each occasion. You additionally need Essay Writing Service UK to consider execution. In case you're just doing this for a solitary occasion it's presumably not too awful but rather in case you're stacking a rundown of occasions and each occasion needs to go out and get frame entries, it could cause a ton of issues.

0 votesVote for this answer Mark as a Correct answer

david warner answered on September 8, 2017 14:12

you have that one frame snared to various occasions, you will get all the shape entries for every one of the occasions. So not by any stretch of the imagination a perfect circumstance; you'd need to have another shape for each occasion. Write my Coursework for me You additionally need to consider execution. In case you're just doing this for a solitary occasion it's most likely not too awful but rather in case you're stacking a rundown of occasions and each occasion needs to go out and get frame entries, it could cause a considerable measure of issues.

0 votesVote for this answer Mark as a Correct answer

Jessica aleson answered on September 8, 2017 14:20

On the off chance that you have a frame being shown in a change regardless you don't have to modify a change, you'd have to manage your option shape or frame meaning of that question Someone to Write my Essay UK

0 votesVote for this answer Mark as a Correct answer

Kellim Worthington answered on September 9, 2017 11:00

Yes if your alternative form has a field in which the real page type does not, that data is not being stored in the database. Buy Assignment UK So what you should to do is generate that field in the main page type description and then explain it on your alternative form(s) as required.

0 votesVote for this answer Mark as a Correct answer

andrew symond answered on September 9, 2017 11:04

At that point in the change you'd have to play out a query of that shape information in view of that field an incentive in the occasion page sort. Coursework Writing Service The drawback of this is the point at which you play out that API inquiry, it will get all the frame entries and not a solitary one. So for that given occasion, you will show every one of the entries for that occasion.

0 votesVote for this answer Mark as a Correct answer

harry gorden answered on September 9, 2017 11:13

Indeed if your option frame has a field in which the genuine page sort does not, that information is not being put away in the database. Coursework Services So what you ought to do is create that field in the principle page sort portrayal and after that clarify it on your option form(s) as required.

0 votesVote for this answer Mark as a Correct answer

Andrew strauss answered on September 9, 2017 11:19

I made an option frame for the Articles page sort and included another field and it has this at the highest point of the new field Do my Coursework for me "This field will be made without database portrayal". So backpedal and add it to the page sort definition and not the option frame.

0 votesVote for this answer Mark as a Correct answer

David Wallburn answered on September 11, 2017 11:23

True blue Essay Help is produced with the Write My Essay game plan to empower each clamoring understudy in dealing with their shot for considers by offering them to finish help with organization making meanders. Right when understudies depend upon our associations, they find the opportunity to focus on their arrangement, instead of putting their essentialness in investigating and framing papers.

0 votesVote for this answer Mark as a Correct answer

Freya Henderson answered on September 16, 2017 13:37

Writing a transformation is a new area for me and I don't have as much knowledge about it. Hope Admission essay writing services will provide more about it.

0 votesVote for this answer Mark as a Correct answer

James MOliver answered on September 20, 2017 09:22

In starting I have no idea about web pages or using form field that's why I also facing issue with form or another development bug because I'm a professional writer associated with Essay Help UK

0 votesVote for this answer Mark as a Correct answer

jhonsmith smith answered on September 27, 2017 07:48

In beginning I have no clue about site pages or utilizing structure field that is the reason I likewise confronting issue with shape or another advancement bug since I'm an expert essayist related with Help with Essay

0 votesVote for this answer Mark as a Correct answer

Scarlett Charlize answered on October 2, 2017 12:28

In information investigation change is the substitution of a variable by an element of that variable different locations that I consume discovered supportive are sprinkled all over Gethomeworkonline.com. One vital case is institutionalization, whereby standards are balanced for contrasting equal and blowout.

0 votesVote for this answer Mark as a Correct answer

gloria win answered on October 10, 2017 08:40

0 votesVote for this answer Mark as a Correct answer

Emma Granger answered on October 13, 2017 08:14

Transformation is the hereditary modification of a cell coming about because of the immediate take-up, joining and articulation of exogenous hereditary material exogenous DNA from its encompassing and taken up through the cell layer Essay Writing Services Transformation happens most generally in microscopic organisms and in a few animal types happens normally. Transformation can likewise be affected by manufactured means. Microscopic organisms that are fit for being changed, regardless of whether normally or falsely, are called skillful.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.