Home > Community > Forums > Custom IC SKILL > hiCreateAppForm carriage return action

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 hiCreateAppForm carriage return action 

Last post Tue, Mar 5 2013 1:56 PM by thomas1000. 2 replies.
Started by thomas1000 05 Mar 2013 12:40 PM. Topic has 2 replies and 794 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Mar 5 2013 12:40 PM

    hiCreateAppForm carriage return action Reply

    I have a form that kicks off a lengthy process.  I have it set up with OK, Cancel, and Default buttons.  I implemented my own "Default" button so the button specification is:  '(OKCancel (Defaults "AFDefCallBack(hiGetCurrentForm())")

    Because the process is lengthy and it is easy for a user to hit carriage return thinking that he is moving on to the next field.  Is there a way to disable the automatic "OK" response for carriage return so that they can finish filling out the form rather than kicking off the process?

    • Post Points: 20
  • Tue, Mar 5 2013 1:50 PM

    Re: hiCreateAppForm carriage return action Reply

    Actually carriage return does not do an automatic "OK" response; in fact it triggers the "default" button for the form - i.e. the one in Red - the one that is first. So for example, if I define the button layout differently, I can get a different button to fire - one different from the OK button:

    hiCreateAppForm(?name 'fred ?fields list(hiCreateStringField(?name 'jim)) ?callback "println(1234)" ?buttonLayout '(Empty (Defaults "println(5678)") (OK "hiFormClose(hiGetCurrentForm())") (Cancel "hiFormCancel(hiGetCurrentForm())")))
    hiDisplayForm(fred)

    Of course, this example is silly - but you'll see that carriage return triggers the "Defaults" button rather than "OK" now. You could make that first button do something non-time consuming but still useful.

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Mar 5 2013 1:56 PM

    Re: hiCreateAppForm carriage return action Reply

    OK.  I had thought of doing something like that but if I had missed a form feature that disables carriage return response I wanted to know about it.  Your suggestion is good.  Thanks.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by thomas1000 at 05 Mar 2013 12:40 PM. Topic has 2 replies.