Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 02 MAR 2020 10:48:25AM Mihyar Al Masalma wrote:

Hello all,

I am having an issue with O4WMarkedOptions(1) on Android devices. When adding O4WMarkedOptions(1) to a O4wSectionStart() it wouldn't compile to form when run on Android device.

O4WSectionStart(prefix:'EqpSection', O4WMarkedOptions(1))

	O4WListStart(0, prefix:"List1", mobile_ContentListStyle$:@SVM:O4WDataStyle("","data-inset","true"))

               * INSERT FORM ELEMENTS

	O4WListEnd(prefix:"List1")

O4WSectionEnd(prefix:'EqpSection')

The result is this:

<div id="M29_EqpSection">

    <ul id="M29_List1"

        class="dlweb-content-list ui-listview ui-listview-inset ui-corner-all ui-shadow ui-group-theme-a"

        data-role="listview" data-theme="a" data-inset="true">

    </ul>

</div>

At 02 MAR 2020 11:14AM bshumsky wrote:

Hi, Mihyar.

What do you mean by "it won't compile"? Do you mean it won't add a form element? There are no input elements in the O4W code you showed, so there's nothing for a form to do…?

Thanks,

- Bryan Shumsky

Revelation Software, Inc.


At 02 MAR 2020 11:29AM Mihyar Al Masalma wrote:

Hi Bryan,

I meant it won't add a form element, I didn't add the elements here but in my code I have 4 form elements. If you want I can include the elements here.


At 02 MAR 2020 01:12PM bshumsky wrote:

Hi Bryan,

I meant it won't add a form element, I didn't add the elements here but in my code I have 4 form elements. If you want I can include the elements here.

Hi, Mihyar. Yes, please show me the code with an input element in the O4W code, and the corresponding HTML, and let's see what we that tells us.

- Bryan Shumsky

Revelation Software, Inc.


At 02 MAR 2020 01:56PM Mihyar Al Masalma wrote:

Hi Bryan,

The following is the used code:

O4WSectionStart(prefix:'EqpSection', O4WMarkedOptions('1'))

	O4WListStart(0, prefix:"List1", mobile_ContentListStyle$:@SVM:O4WDataStyle("","data-inset","true"))

		

		* Submitted By

		DefaultCode	= "Employee Name"

		O4WSectionStart(name:"TR", "dlweb-grid")

			O4WSectionStart(name:"TD1", "dlweb-block1-25":@SVM:"dlweb-label-small")

				label = "*Submitted By"

				O4WSectionStart(name:"TD12", "dlweb-table  dlweb-table-height-textbox")

					O4WSectionStart(name:"TD13", "dlweb-table-cell-middle dlweb-wrap")

						O4WText(label, "", O4WTextOptions(name, "", ""))

					O4WSectionEnd(name:"TD13")

				O4WSectionEnd(name:"TD12")

			O4WSectionEnd(name:"TD1")



			O4WSectionStart(name:"TD2", "dlweb-block2-75":@SVM:"dlweb-data")

				O4WSectionStart(name:"TD2Wrapper", "dlweb-input-wrapper")

					Style	= O4WDataStyle("","data-clear-btn","true")

					O4WTextbox(DefaultCode, '', '', name, name, Style)

				O4WSectionEnd(name:"TD2Wrapper")

			O4WSectionEnd(name:"TD2")

		O4WSectionEnd(name:"TR")

		

	O4WListEnd(prefix:"List1")

O4WSectionEnd(prefix:'EqpSection')

and this is the resulted HTML cod:

<div id="M29_EqpSection">

    <ul id="M29_List1" class="dlweb-content-list ui-listview ui-listview-inset ui-corner-all ui-shadow ui-group-theme-a"

        data-role="listview" data-theme="a" data-inset="true">

        <div id="0TR" class="dlweb-grid">

            <div id="0TD1" class="dlweb-block1-25 dlweb-label-small">

                <div id="0TD12" class="dlweb-table  dlweb-table-height-textbox">

                    <div id="0TD13" class="dlweb-table-cell-middle dlweb-wrap"><label for="0"><span>*Submitted

                                By</span></label></div>

                </div>

            </div>

            <div id="0TD2" class="dlweb-block2-75 dlweb-data">

                <div id="0TD2Wrapper" class="dlweb-input-wrapper">

                    <div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset ui-input-has-clear"><input

                            type="text" name="0" id="0" data-clear-btn="true" value="Employee Name"><a href="#"

                            tabindex="-1" aria-hidden="true"

                            class="ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all"

                            title="Clear text">Clear text</a></div>

                </div>

            </div>

        </div>

    </ul>

</div>

At 02 MAR 2020 06:16PM bshumsky wrote:

Hi, Mihyar. OK, the good news is we do indeed get the input element:

<input type="text" name="0" id="0" data-clear-btn="true" value="Employee Name">

O4W "knows", though, that to be a form we need to have both an input element (at least one), and some kind of 'submit' button. Without the button, what does it mean to make this particular section a form? So if you want this particular section to be its own form, it has to have a button too.

NOTE: just to clarify, I'm not saying that you need to have a button for submission in every section, or anything like that. Normally, O4W will make a form that goes around your input element(s) and associate them with the "nearest" submission button. You're overriding this behavior by specifically asking this section to be a form (with the O4WMarkedOptions call), so you'll want to put a button here too otherwise your O4WMarkedOptions specification doesn't make any sense…

I hope that was clear (but fear it may not have been…)

- Bryan Shumsky

Revelation Software, Inc.


At 03 MAR 2020 09:49AM Mihyar Al Masalma wrote:

Hi Bryan,

Two points that I would like to highlight.

1- Using the code mentioned above the form was created on Windows and Apple platforms, the issue occur with Android platform. the missing button doesn't explain why it would behave as it should on those two platforms then behave differently on Android.

2- I did the changes suggested above (adding a submit button) still was not able to generate a form on Android. I even took it a step further and used O4WRaw('<form>') and this was completely ignored and the page had no form.

cheers,


At 03 MAR 2020 10:08AM bshumsky wrote:

Hi Bryan,

Two points that I would like to highlight.

1- Using the code mentioned above the form was created on Windows and Apple platforms, the issue occur with Android platform. the missing button doesn't explain why it would behave as it should on those two platforms then behave differently on Android.

2- I did the changes suggested above (adding a submit button) still was not able to generate a form on Android. I even took it a step further and used O4WRaw('<form>') and this was completely ignored and the page had no form.

cheers,

Hi, Mihyar. How are you generating it especially for Android, versus Windows and Apple platforms? Are you using O4WSetMobile(1)? O4W doesn't normally "know" what platform it's targeting, though if mobile mode is turned on (with O4WSetMobile) then it _should_ generate output that uses jQuery Mobile, and expect/generate page layouts that conform with jQuery Mobile's design, rather than plain old jQuery.

At this point, maybe you can make me a very very simple example of the problem you're seeing, so I can try and debug it myself - send it to [email protected], and I can take a look at it…

Thanks,

- Bryan Shumsky

Revelation Software, Inc.


At 03 MAR 2020 10:19AM Mihyar Al Masalma wrote:

Hi Bryan,

we have a JScript code that check for the OS.

I went ahead and did some changes there and that fixed it.

thank you for your feedback

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b6c6b8041bd50448bdd9e3ad7efb9c7a.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1