Closed jsbriantes closed 6 years ago
@jsbriantes Since DrupalGap 7 isn't an SPA, we have to append use a unique form id each time it is rendered. In you're form builder function try something like this:
function my_custom_form(form, form_state) {
form.id += '_' + user_password();
}
This is a design flaw in DrupalGap 7, but hopefully this workaround will work for you.
The user_password()
function just returns a random string.
Thanks very much. I assumed that It was the problem due some test I did. I'll put different id as you said.
I have created a custom form to search products (following docs example). I want this form to stay in the header (as in Ebay or Amazon app). Although you go to other page, the form should always be on the top. I have create a custom module and I have added a function mymodule_block_info where I added a new block:
The block_view function:
In settings.js I have added the new block to the header region:
It works good and the form is functional. But if you navigate to a page and then go back, the form disappears from then page. Every time you go to a page that was previously visited, the form disappears. I have tried adding {reloadPage:true} to the link, but without success. As I have checked with debugger, the form is totally removed from the original page. How could I do it?