Dependent submit button in angular to fetch JSON file and display - angularjs

I'm working on an AngularJS project, also pretty new to this and have managed to create a dependent drop-down menu.
Example:
Parent Drop-down- Cars
- Bikes
Child Drop-down- BMW, Audi
- Yamaha, Honda
So from the above example, if I choose Cars in the first drop-down it will display BMW and Audi in the second drop-down. Same for bikes.
Now if the user chooses BMW and clicks the submit button I want it to redirect to a URL which contains a JSON file and display the result in the form of a table.
If the user chooses Yamaha similarly it should redirect to another JSON URL and display the result in a table.
How can this be achieved in AngularJS, with a single "Submit" button?
Any help is much appreciated.
Regards.

Your vehicle dropdown should have unique ID such as cars for 1, bikes for 2 here 1 and 2 are unique ID for this category of vehicles.
Now on submit call a function which will take you to another page now, send this uniqueID of vehicles into statparams and on that page and on page OnInit make a http call and bind the models to that dropdown.

Related

i have put refferal id in form input feild which is present in url

I have created a referral link in my angular project which has carry a referral id when I copy that link and search on browser I want that referral number in the input field of the form on that page. Can anyone tell me the solution
i had with save this referal link in variable and display in interpolation but in form field referal link is not showing

Can I filter out JSON information and display it using react?

I am making a web app with react for ordering food and drinks and the menu is stored in a database, however I want categories as dropdowns and info under the categories with these category tags, now I'm using react bootstrap and won't need help with that but I was just asking if it's possible to filter out information by it's JSON key i.e
{
category:"Food"
sub-category: "On The Grill"
item: "Mixed Grill"
price: 16.99
}
So i would have the food and drink on separate "tabs" and "On The Grill, to be displayed as a dropdown title, and mixed grill to be displayed under it, is that possible using, .map or .forEach()

Algolia Autocomplete and display in result page on enter key or submit

I am looking for a solution with Algolia in React. I have a search bar where I am using autocomplete feature to load the result of products . Now when i click on submit button or Enter key i want to redirect to new result page where i want to display all the products with the available filters. As i seen most places it is using instantSearch where result loads on typing. Im looking for separate result page with filters and apply filter within the result page.

open data in new page from the link (index of array) in home page in reactjs

In the first picture i have a table of data and i want to click on any link of any person(index) and opens the all data of this index (person) in new page like the pic 2 .
Here is my Picture 1 and picture 2
To do so, you need to have a URL with the person ID, like this app-url/persons/123. After that, you need to get the ID in the component to fetch the data from the server. This way, each time you access the URL with the person ID, you will have your data. Finally, you can have a link that opens the page in a new tab, like this: Person name The target="_blank" on the a tag will open a new tab.

Drupal Webform - How to load values from form, filled in a previous page

Working on Drupal, I have a page with a form made with "Webform" module, containing several fields (text fields and sliders) and a "Submit" button.
When the user enters the information and presses the "Submit" button, another page is loaded with custom code into it.
The new page is devided into 2 parts - the first one contains new information(based on the user input from the previous page); the second one contains (block) the same form, used in the previous page.
Is there a way to load the values, filled in the form from the first page into the new page?
First of all you would need to make a custom module, with the help of
hook_form_alter
You would need to store the previous form's information in cookies with prefix
Drupal_visitor_
and then display it in the new page like:
$form['submitted']['FirstName']['#default_value'] =
$_COOKIE[$firstname];
Thanks

Resources