Not able to get the Input box value from current view. Value return from previous-view

I have two pages page1.html, page2.html, Both pages have the same input boxes but page2.html have additional fields. I am fetching input box value using element by ID.

Not able to get Page2.html form details except the new fields. It seems all other fields value to return from previous-view. so that it returns all values are empty.

Can anyone help How to fetch textbox value of current view page?

Some code would be helpful…

You have to use class not id.
Because id can have only one element.
Because framework7 will have create same view in history.
So , if 1st pate had id and 2nd page also use same id it will have problem.

Yes. Exactly. But the problem is, I am not able to use class to get value of the element. $$ not working. and not able to use Class in javascript.

I have figured out with Adding jQuery library included to index.html and used

Thank you for your reply.

You are welcome.
There must be something wrong with your code I always use


And it working for me.

I am always creating the app using Framework7 CLI. so $$= Dom7 not working.


// Import main app component
import App from ‘…/app.f7.html’;

var app = new Framework7({
root: ‘#app’, // App root element
component: App, // App main component
id: ‘com.wash.patrol’, // App bundle ID
name: ‘Wash Patrol’, // App name
theme: ‘auto’, // Automatic theme detection