Search current page for user entered keywords

Hi Guys, Im back again asking questions and whatnot...

Is there a method that allows a user to enter a term in a search box that searches for that term (possibly highlighting) on the current page?


I hve a HUGE form to navigate through, I am using accordion to tidy up but I have been asked if there is a way to search the page for a specific value.


For instance if in the middle of this form there is 'Foo' as a field title and 'Bar' as the input filed, I need to be able to enter 'Foo' click search and highlight the field title?


all filed names and ID's are known but as you know ID's are dynamically created, though classes remain the same.


I was thinkning about using classs names to distinguish each other using Javascript but I am hoping there is a mod around that does something similar.


All the best and thanks for reading and helping.


Jim


Hi Jim,

You may be able to use JavaScript to pull that off, but there's nothing in the Platform that allows you to easily do that.

Kilian Hekhuis wrote:

Hi Jim,

You may be able to use JavaScript to pull that off, but there's nothing in the Platform that allows you to easily do that.

Thanks I will probably end up doing that anyway.


But I sit and hope ;)




Hi Jim,

I don't think there's an OutSystems widget that will do this out-of-the-box. You'd have to create a component to implement it. You could create classes to distinguish elements, or you could have a Javascript method that would take the form HTML and add CSS classes to highlight elements, as well as scroll the page until the element was in view.

But I have to ask, have you considered refactoring the form itself? A large form in the same page sounds very user unfriendly - doubly so if you've reached the point where you need to consider implementing browser CTRL+F in the page itself. Would it be possible to reshape it into a Wizard? This way you could also have user input saved every step and not risk losing it halfway between a larger form.

Afonso Carvalho wrote:

Hi Jim,

I don't think there's an OutSystems widget that will do this out-of-the-box. You'd have to create a component to implement it. You could create classes to distinguish elements, or you could have a Javascript method that would take the form HTML and add CSS classes to highlight elements, as well as scroll the page until the element was in view.

But I have to ask, have you considered refactoring the form itself? A large form in the same page sounds very user unfriendly - doubly so if you've reached the point where you need to consider implementing browser CTRL+F in the page itself. Would it be possible to reshape it into a Wizard? This way you could also have user input saved every step and not risk losing it halfway between a larger form.

I would have done a simple form with fields that are related to each other, however, the Client requires it, and 'The Client' word is in stone...


Thanks for the help though I will probably write some JS or a jQuery Plugin


Jim