Modal dialog message not working on android tablets

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elazarus3
User
Posts: 90

Modal dialog message not working on android tablets

Post by elazarus3 »

I added code to Page_datarendering on list page to display a modal dialogue that gets user input. It works perfectly on desktops (firefox, chrome), but does not display properly on android tablets. The radio buttons and submit button does not show. Curious if problem with my code or limitation with compatibility with PHPmaker / android tablets:

The message is displayed in page_datarendering on list page via this command:
if ($medicare_message <> "") $this->setFailureMessage ($medicare_message);

This is a snippet from the check_medicare function:
$message = '

        <div class="modal-header">
            <h1 class="modal-title">Confirm Medicare Status</h1>
        </div>

            <form role="form" method="POST" action="">
                <input type="hidden" name="_token" value="submit">';
				$message .= '
				<input type="hidden" name="'.EW_TOKEN_NAME.'" value="'.CurrentPage()->Token.'">
                <div class="form-group">
                    <label class="control-label">Does patient have Medicare?</label>
                    <div class="radio">

<label><input type="radio" name="optradio" value="no"><b>NO: </b>Patient verbally confirmed they <b>DO NOT</b> have Medicare</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio" value="yes"><b>YES: </b>Patient has Medicare.</label>
</div>
<div class="radio disabled">
<label><input type="radio" name="optradio" value="unknown" checked="checked">Did not ask. Check again later.</label>
</div>
</div>


                
                <div class="form-group">
                    <div>
                        <button type="submit" class="btn btn-success">Submit</button>
 
  
                    </div>
                </div>
            </form>

mobhar
User
Posts: 11660

Post by mobhar »

Press [F12] and see whether any Javascript error message.


elazarus3
User
Posts: 90

Post by elazarus3 »

Mobhar - thanks. I'm not seeing any errors.

Dialog works fine on all desktop browsers, just not in android - newest browsers installed. Is this a limitation in phpmaker?
I can echo the form in the header and it works, but much nicer as a modal dialog.
Tried stripping out bootstrap - just doing the setmailuremessage as simple form - on android still no form elements shown (submit buttons, radio buttons, etc).


kirondedshem
User
Posts: 642

Post by kirondedshem »

why dont you use the phpmaker javascript function for showing content in modal dialogs. for example,create a phpmaker generated add form from a table where you want to save this or editable view if applicable otherwise create a custom file with the form(you can start with basic controlls to be sure), then call that custom file or add form in a modal dislog once a page loads by putting this in your startup scripts of your desired page after the page loads.

ew_ModalDialogShow({url:"my_page.php"});

HINT:you can even create a button on said form which a user can click to repopup the form like
<a onclick="ew_ModalDialogShow({url:'my_page.php'});" href="javascript:void(0);">my button</a>

HINT:Ive tested this on my android 7 mobile phone and even though the page having the link to the dialog is in mobile view the popup still displays and since i use divs it also displays in a mobile friendly way. I can display both custom files and normal phpmaker add/edit and view pages in a modal dialog with this


Post Reply