Hello All,
We have a requirment in which the registration form in the event portal fields First Name and Last Name should be auto filled when user regsiters.
We are thinkging to pass these parameters in the URL
User received an event landing page and we are passing two parameters first_name and last_name as below
https://xyz.microsoftcrmportals.com/event/sessions?id=Event_A&first_name="A"&last_name="B"
is it possible to read and fill these parameters into registration form and pre fill the data?
In the sameway we have to give an URL to user => Give link parameters in the eventlandingpage URL, that the session tracks TAB are directly the landing page (that the contact does not have to click on session track and select in the drop-down architect)
Since we are new to the Event portal we are investigating possible ways to accomplish the requirements.
Please let us know various possible solutions.
Regards
Abhilash.
Hi Abhilash,
It is very glad that you have found the solution and thanks for sharing it. :)
Regards,
Clofly
Hello Clofly,
Thank you for your reply with detailed information.
Yes i was able to pass a parameter to the sessionslist components from the event component and able to retrieve the value and set it to the drop down.
Did some changes in the route.ts which worked.
Kind Regards
Abhilash.
Hi Abhilash,
You could refer to following steps to achieve the functionality:
1. Open attendee.component.ts file in src\app\components\eventregistration\attendee.
2. Import the Angular router module to query parameters of URL.
import { ActivatedRoute } from '@angular/router';
3. Add following code to ngOnInit function:
this.attendee.firstName = this.route.snapshot.queryParams['first_name']?this.route.snapshot.queryParams['first_name']:""; this.attendee.lastName = this.route.snapshot.queryParams['last_name']?this.route.snapshot.queryParams['last_name']:"";
ngOnInit means that executing code at OnLoad event of page.
By default, an attendee object has already been defined to store first name and last name, and properties of the object are bound with input fields of registration form, so we can use them directly.
Test:
For your second requirement: "In the same way we have to give an URL to...", as per my understanding, do you mean that you want to also contain a session parameter in URL and when the contact opens such URL, the associated session will be added to his cart?
If so, I believe it is customizable, but I am afraid that I couldn't give a detailed solution as soon as possible due to more time is required for me to learn how to add advanced customization to Angular project.
Regards,
Clofly
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156