I’m looking to create a pop up where by the user inputs data, then select one of two radio options by the UI seems to screw up when I have a combination of both text type and radio type in a pop-up.
Here is my code:
I was also looking for same thing today.
But look at this discussion, which says mixing of radio, checkbox or text box is not available right now.
I also tried to add mixture of radio and text field in alert. But styling never appeared correct.
I am moving on to implement this feature using a ionic page so that I can use Ionic Modal. This behaves as a modal window on large screen and as pushed page in smaller screen.
I needed to send back data from parent page to child page and other way too. Thus Ionic Modal suited best for this in my situation which can be used on component/page.
Refert to this detailed usage instructions for Ionic Modal.
Same feature has been requested from Ionic team.
Related
So I do not know exactly on how to word this so I tried my best in the title.
What I am trying to do is have a modal popup and as the user clicks a next button, it slides to the next screen. Here is an example of what I am trying to accomplish.
This is the home screen. When a user hits start a Ionic Modal pops up
This is the ionic modal. I am going to add a next button that allows a user to go to the next screen or go back to the previous screen before submitting.
SO, I do not want to use states because I do not want to have to create a state in app.js for each and every screen. Is there a way to add multiple views and switch between them using a Ionic Modal? Or will I have to use States or create multiple Modals?
TL;DR -> I want to slide between views when a next or back button is pressed. (Survey application)
NOT looking for code writing exactly, just trying to pick someones brain on how they would accomplish the sliding between views using a Modal
Thanks everyone!
You probably need on click on your button :
force close of your modal
use $state.location to change $state
This is what I'd try if I was in your situation ;)
I am creating an Ionic 2 mobile app and am having some problems with input fields and keyboards. For now, I am only referring to iOS. This is the page without any input activated.
Now, If I tap on CVV or Postal Code input fields, the keyboard does not push the ion-content up so the cvv or postal code fields are in focus above the keyboard.
If I tap on postal code field, the entire input is covered by the keyboard. No scrolling happens. Before this issue, when the keyboard would open the content would squeeze up above the keyboard, but the content would squeeze, not push up off the screen if it is too large to fit the content.
Anyone have advice on how to do this? I do not think it requires any plugins to control the content or keyboards. It seems to have something to do with styling with percentages.
I need to see some page code to help, but i had this problem too and solved by doing:
Wraped all my inputs on <ion-item> tags.
Used ionic input tags (not the regular <input> tag).
Put all inside a <form> or <ion-list> (what you probably have done).
Without this i was having issues of fields remaining static where they are and focus errors on many input types (textarea being the one with more errors).
For scrolling pb, i wrote a hack here : https://github.com/ionic-team/ionic/issues/10629#issuecomment-395084125
In the constructor of app.components.ts :
window.addEventListener("keyboardDidShow", () => {
document.activeElement.scrollIntoView(false);
});
I need to be able to have a popup, preferably like a lightbox that displays an html message when a user clicks a link. The popup will populate the screen and the user will have to click "OK" after reading the message. How can this be done using lightbox? I'd rather avoid using a boring prompt as its much less attractive.
http://lokeshdhakar.com/projects/lightbox2/
You might be able to do it in lightbox, but as far as I can tell it's not quite what lightbox was intended for. You may want to consider a more generic "modal" type of solution. A common one is jQuery UI's Dialog. Another common one is Bootstrap's modal solution.
I am creating a small form where the user
Enters some text in an input box
Chooses from a bunch of options
regarding the actions that need to
be taken with the data
Clicks a submit button
Disconnect does something similar in a better way:
you can click on any of the five divisions here. This is wonderful because it makes it easier for users to perform the same task and simplifies choose and click to click.
What technology is used to display such a menu?
A nice way of doing this is - which doesn't need javascript - is to use radio buttons, but make them invisible. The clickable text and icon go inside of the label for each radio button, so you can click the label or icon to select the radio button.
This ensures a few important things:
Only one item can be selected
The selection is passed back with the form
The browser's native form handling still works
Accessibility options still work
You do have to be careful to make the labels obviously clickable, since you lose the visual cue of having the radio buttons visible.
IE6 & 7 also require a hack - they have a weird behaviour that a display:none or visibility:hidden radio button or checkbox cannot be selected by clicking its label.
Here's an example: http://www.spookandpuff.com/examples/clickableToggles.html
(I haven't included the icons - you can easily add these by setting them as the background in CSS for each item (don't use <img> tags).
Edit Oh man - I just read the question properly! Sorry, you want the behaviour to be 'choose' rather than 'choose and submit'... An easy way to do this is to add some javascript to the inputs to have them auto-submit the forms when they're selected. I've updated the example to show this.
Looks like JavaScript: https://github.com/disconnectme/disconnect.me
Basically, what I want to do is put some buttons before the tabs in a gtk.Notebook. I tried making my own notebook type widget and it worked well, but it would have required lots more work to make it as flexible as I would like, also it wasn't as efficient.
Here is a mock-up of what I'm trying to achieve: http://imagebin.ca/view/84SC0d.html
Any ideas would be much appreciated, thanks.
Ben.
You might be interested to know that this functionality has been added in GTK 2.20, see "Changes in GtkNotebook" in the following announcement: http://mail.gnome.org/archives/gtk-devel-list/2010-March/msg00132.html
It's a hack, but you can put your widgets on a separate tab, and then prevent the tab from being clicked by registering the following switch-page event for the notebook:
def onTabsSwitchPage(self, notebook, page_notUsableInPython, pageNumber):
# Don't allow to switch to the dummy tab containing widgets
if pageNumber == <put correct tab number here>:
notebook.stop_emission("switch-page")
Note that this doesn't look good with all GTK themes, but it works...
I don't think there's any way to do it without making your own notebook widget. There are a couple of hacks. One was posted by AndiDog. Another is to hide the tabs altogether (notebook.set_show_tabs(False)) and make a toolbar with buttons above the widget, with your buttons on the left, plus one button for each tab in the notebook that switches to that page.
Instead of making your own notebook-type widget from scratch, you could inherit from gtk.Notebook, overriding some of the methods like expose_event, size_request, and size_allocate, in order to deal with two types of container children: pages and buttons. I don't know how to do this in PyGTK though, only in C.
You might also consider whether the buttons in the tab space are really what you want. What if the user resizes your notebook small enough that some of the tabs disappear? Where do the previous tab/next tab arrows go? What happens to the buttons?