I have a homework assignments screen and what I would want to occur is when the user clicks on the ‘subject’ field, the list viewer displays their subjects which they have previously entered so that they can pick a subject for the assignments. I have designed the code as follows:
When the subject field is clicked the first time, it works fine, however, it does not work again once the assignment as been added. I’m not sure why this is occurring, any help would be much appreciated.
Hi, @jakeheron! I think getting a new list-viewer for selecting stored subjects would simplify the process for you
If you create a new listviewer for displaying stored subjects, you would not need to check if list = subjects list when an item click occurs in the assignments list; You can add the code for subjects list - item click into it’s own block.
You can hide/show the list whenever you like, for example after selecting the subject, hide the subject list and show the assignments list.
Let me know if this works for you. Cheers!
Also I had a look into your project, and I must say too - you have designed a very clean and beautiful UI for your app. Congrats!
Thank you very much for the kind words. I have added your suggestion and it is working, however, there is a still a problem with selecting the text input field. When the input is clicked the first time, everything works fine, however, if you selected it again, nothing happens. Any reason why this may be occurring.
Yes it is working, however, as previously stated, it does not work the second time. In other words, once the assignment has been added, if the user clicks on subject again, the subject list will not be shown. You can test it if you like:
I was able to re-mix your project and use the DEMO button as suggested but once I select a subject from the timetable, the app crashes and never reach to the homework screen.
Hi, @jakeheron! I ran some tests on your given project, and it seems that there’s a bug in the textInput.click block - It does not consider more than one clicks. I hope the Thunkable team will fix this.
Meanwhile, you can try this workaround - since you are not letting the user actually enter text into the subject box, why not make it a button? (subject input in the below code represents a button)
Now in the Designer area, you can customize the borderColor, fontSize, etc. of the subject input button to make it look similar to it’s surrounding components (dateInput / textInput).
Thank you for forwarding this issue, in the meantime, I have just used a button disguised as a text input and it works fine. Thanks @kartik14 and @tatiang for your help!
@tatiang
I tested the Text Input click behavior and found that in Thunkable Live App in the phone the click is registered every time you click on something else (the text input goes out of focus) and then back to it.
So if you click anywhere in the screen then click on the Text Input then the click will be registered (using the phone).
I think this is meaningful to differentiate the click from the change event.