Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Custom Field Needs to be Dirty for Submit to be active?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Field Needs to be Dirty for Submit to be active?

    I have a custom field that returns dynamic html form elements depending on the value of another field in the grid. The dynamic nature of the form is working great, but the Submit button is not activated when the user makes a selection (for example.. clicks on one of the radio buttons). I assume this is because I have not done something to make the grid recognize that a row has been made dirty. Does anyone know how this can be accomplished?

    Thanks for your help.

    #2
    Re: Custom Field Needs to be Dirty for Submit to be active?

    Is there anyone who can help with this? I've been experimenting in the area of the client-side events, using the onRowBlur event. The {grid.object}.submitGridPartRow(rowNum) method is not working for me. This approach would be satisfactory if I could get it to work. The objective is to render a dynamic user-defined answer set in a survey. The dynamic answer options are defined based on the survey designer's selection of an answer group. In addition to the pre-defined options, the designer can also select a "User-Defined, Multiple Choice" layout where the radio button options are defined by a semi-colon delimited list. The code defining the custom control is outlined below. I is rendering the control very nicely, but I just can't get it to record the user's selections. BTW, I'm using a mySQL database.

    Any help would be greatly appreciated!

    Code:
    'Write Xbasic code here that returns the HTML to be displayed by this control
    dim ansgrp as c
    dim ansform as c
    dim ansopts as c
    dim i as n
    ansgrp = data.answergroup
    SELECT
    	CASE ansgrp = "Rating Level - 10"
    		ansform = "<FORM><input type='radio' name='1' value='1' />1   <input type='radio' name='2' value='2' />2   " \
    			"<input type='radio' name='3' value='3' />3   <input type='radio' name='4' value='4' />4   <input type='radio' name='5' value='5' />5   " \
    			"<input type='radio' name='6' value='6' />6   <input type='radio' name='7' value='7' />7   <input type='radio' name='8' value='8' />8   " \
    			"<input type='radio' name='9' value='9' />9   <input type='radio' name='10' value='10' />10   </form>"
    	
    	CASE ansgrp = "Satisfaction Level - 5"
    		ansform = "<FORM><input type='radio' name='Very Disatisfied' value='Very Disatisfied' />Very Disatisfied   " \
    			"<input type='radio' name='Disatisfied' value='Disatisfied' />Disatisfied   " \
    			"<input type='radio' name='Neutral' value='Neutral' />Neutral   " \
    			"<input type='radio' name='Satisfied' value='Satisfied' />Satisfied   " \
    			"<input type='radio' name='Very Satisfied' value='Very Satisfied' />Very Satisfied   </form>"
    	
    	CASE ansgrp = "Agreement Level - 5"
    		ansform = "<FORM><input type='radio' name='Highly Disagree' value='Highly Disagree' />Highly Disagree   " \
    			"<input type='radio' name='Disagree' value='Disagree' />Disagree   " \
    			"<input type='radio' name='Neutral' value='Neutral' />Neutral   " \
    			"<input type='radio' name='Agree' value='Agree' />Agree   " \
    			"<input type='radio' name='Highly Agree' value='Highly Agree' />Highly Agree   </form>"
    	
    	CASE ansgrp = "User-Defined, Multiple Choice"
    		dim delimcnt as n
    		dim guts as c
    		dim option as c
    		dim template as c
    		dim workingbody as c
    		dim finalbody
    '		
    		finalbody = ""
    		ansopts = data.answeroptions
    		delimcnt = occurs(";",ansopts)
    		template = "<input type='radio' name='zzz' value='zzz' />zzz   "
    		
    		FOR i = 1 TO delimcnt
    			option = word2(ansopts,1,";")
    			workingbody = stritran(template,"zzz",option)
    			finalbody = finalbody + workingbody
    			ansopts = alltrim(right(ansopts, len(ansopts)-(len(option)+1)))
    		NEXT
    		ansform = "<FORM>"+finalbody+"</FORM>"
    
    	CASE ansgrp = "Textbox"
    		ansform = ""
    	
    	CASE ELSE
    	
    END SELECT
    Answer_render = ansform

    Comment


      #3
      Re: Custom Field Needs to be Dirty for Submit to be active?

      Anybody have any thoughts on this?

      Comment


        #4
        Re: Custom Field Needs to be Dirty for Submit to be active?

        This issue may be solved with the dynamic checkbox control demonstrated in the newest video #D52, if the same functionality applies to a grids. I'm going to give it a try today.

        Comment


          #5
          Re: Custom Field Needs to be Dirty for Submit to be active?

          Hi Miles,

          I'm not the expert on this, but I've got something similar to work. Because your controls are sort of 'unbound', you need to set some field in the grid when the user selects the control. I think you need to add an 'onchange' event and action to each of your 'input' controls:
          Code:
          <input type='radio' name='3' value='3' [COLOR="#FF0000"]onchange="{grid.Object}.setValue('FIELDNAME',3);"[/COLOR] />3
          Also, your names should all be the same for each group of choices, if you want only one choice in that group:
          Code:
          CASE ansgrp = "Rating Level - 10"
          	ansform = "<FORM><input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='1' />1   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='2' />2   " \
          		"<input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='3' />3   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='4' />4   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='5' />5   " \
          		"<input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='6' />6   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='7' />7   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='8' />8   " \
          		"<input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='9' />9   <input type='radio' [COLOR="#FF0000"]name='ratelevel'[/COLOR] value='10' />10   </form>"
          - Dan Hooley
          - Custom Desktop or Web database development -

          Comment


            #6
            Re: Custom Field Needs to be Dirty for Submit to be active?

            Dan, thank you for your feedback. It makes sense to me that the an 'onchange' event would have been missing. I just am very weak in html. This afternoon, I followed the lead I mentioned in post #4 and had success. In the process I was able to reduce the code significantly. As I suspected, the approach used on the dialog component in video #D52 was transferable to the grid component by changing a few element references. The discovery of the a5w_checkboxes() function was the goldmine that enabled me to shorten my code. It also enabled me to load the checkboxes with pre-selected values, which is something that would be necessary if I want to enable the user to go back and change their selection. This would probably have been another data binding issue in my first approach.

            So here's the new code... it works great! If you anyone is a novice like me you would have to see video #D52 to understand. By the way, I put this code into the 'OnExistingRowRender' server-side event. It uses the e.javascript property to insert the dynamic HTML.

            Code:
            ansgrp = e.rowdata.data("answerGroup")
            SELECT
            	CASE ansgrp = "Rating Level - 10"
            		anslist = "1,2,3,4,5,6,7,8,9,10,"
            	
            	CASE ansgrp = "Satisfaction Level - 5"
            		anslist = "Very Disatisfied,Disatisfied,Neutral,Satisfied,"
            	
            	CASE ansgrp = "Agreement Level - 5"
            		anslist = "Highly Disagree,Disagree,Neutral,Agree,Highly Agree,"
            	
            	CASE ansgrp = "User-Defined, Multiple Choice"
            		anslist = e.rowdata.data("answeroptions")
            	
            	CASE ELSE
            END SELECT
            selected = e.rowdata.data("answer")
            anslist = a5w_checkboxes(anslist,"V.R"+e.rownumber+".ANSWER",selected,"","","","{grid.ComponentName}.V.R"+e.rowNumber+".ANSWER")
            
            dim id as c
            id = "{Grid.ComponentName}.V.R"+e.rowNumber+".ANSWER"
            dim js as c
            js = "$('" + id + "').innerHTML = '"+js_escape(anslist)+"';"
            
            e.javascript = js

            Comment

            Working...
            X