[Mayan EDMS: 2614] Customize the search form

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2614] Customize the search form

LeVon Smoker
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)

As always, I don't want to hack the original source code...

Thanks.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2623] Re: Customize the search form

rosarior
Administrator
Autocomplete is possible but will require a new API to return the top result values so that a smart widget like Select2 could display them. Possible but requires code changes. 

What do you mean by "change the field labels"? Can you expand on this? This one might be simpler to implement.


On Tuesday, July 31, 2018 at 2:17:45 PM UTC-4, LeVon Smoker wrote:
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)

As always, I don't want to hack the original source code...

Thanks.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2637] Re: Customize the search form

LeVon Smoker
Using a custom app, I overrode (is that a word?) the appearance/home.html template to point at my own url on the Advanced button ({% url 'my_overrides:search_advanced' search_model='documents.Document' %}). From there it was creating custom versions of AdvancedSearchForm, AdvancedSearchView, and ResultsView to get what I wanted. My version of AdvancedSearchForm adds a ModelMultipleChoiceField which provides an autocomplete way to find specific documents.

In my AdvancedSearchForm, I was able to change the label on a field - Label - to Name (users were confused - "where's the document name?")

On Wednesday, August 8, 2018 at 5:11:44 PM UTC-4, Roberto Rosario wrote:
Autocomplete is possible but will require a new API to return the top result values so that a smart widget like Select2 could display them. Possible but requires code changes. 

What do you mean by "change the field labels"? Can you expand on this? This one might be simpler to implement.


On Tuesday, July 31, 2018 at 2:17:45 PM UTC-4, LeVon Smoker wrote:
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)

As always, I don't want to hack the original source code...

Thanks.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2658] Re: Customize the search form

rosarior
Administrator
"I overrode (is that a word?)" I'm not a native speaker, my guess is as good as yours :D

Thanks for sharing your customization. I'll see if we can add some of your changes so you don't have to rewrite all from scratch on the next update.

On Thursday, August 9, 2018 at 2:51:06 PM UTC-4, LeVon Smoker wrote:
Using a custom app, I overrode (is that a word?) the appearance/home.html template to point at my own url on the Advanced button ({% url 'my_overrides:search_advanced' search_model='documents.Document' %}). From there it was creating custom versions of AdvancedSearchForm, AdvancedSearchView, and ResultsView to get what I wanted. My version of AdvancedSearchForm adds a ModelMultipleChoiceField which provides an autocomplete way to find specific documents.

In my AdvancedSearchForm, I was able to change the label on a field - Label - to Name (users were confused - "where's the document name?")

On Wednesday, August 8, 2018 at 5:11:44 PM UTC-4, Roberto Rosario wrote:
Autocomplete is possible but will require a new API to return the top result values so that a smart widget like Select2 could display them. Possible but requires code changes. 

What do you mean by "change the field labels"? Can you expand on this? This one might be simpler to implement.


On Tuesday, July 31, 2018 at 2:17:45 PM UTC-4, LeVon Smoker wrote:
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)

As always, I don't want to hack the original source code...

Thanks.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.