NetTalk Central

Author Topic: NT5 need to update options on a type "Radio"  (Read 5121 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 446
    • View Profile
    • Email
NT5 need to update options on a type "Radio"
« on: April 12, 2012, 12:25:09 AM »
Hi

I have a Radio option field where the Text is a var. I would like to update the content in each option. But how to do??

Any ideas?

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11298
    • View Profile
Re: NT5 need to update options on a type "Radio"
« Reply #1 on: April 12, 2012, 01:11:03 AM »
Hi Niels,

so, the option is a "variable". That's fine, you can use a variable name in place of a
'fixed text' for the radio option in the template settings.

search for where the template is using that variable name (in the value::fieldname) and prime
the variable before then. (you could use, for example, a sessionValue if you liked.)

then, when the user does something that causes the radio to change, refresh the Radio field.
For example, if they click a checkbox, then add the Radio field to the list of "reset fields" for the checkbox.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 446
    • View Profile
    • Email
Re: NT5 need to update options on a type "Radio"
« Reply #2 on: April 12, 2012, 03:16:59 AM »
Hi Bruce

I already did. Just as I use to do.
My options are build from a table in the Value::XXXXX  Routine and works great, but won't update. If I view the soure in the Browser, I see the updated code but not i normal view.
strange!!!

/Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11298
    • View Profile
Re: NT5 need to update options on a type "Radio"
« Reply #3 on: April 12, 2012, 05:16:29 AM »
 remember on a refresh the "record" is not loaded (you _must_ use Session values to get to the file fields).

If you're using some other table, remember to open the table, and read it, in the routine. It won't be opened by default.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 446
    • View Profile
    • Email
Re: NT5 need to update options on a type "Radio"
« Reply #4 on: April 12, 2012, 08:56:35 PM »
Everything you suggest, I have already done. Otherwise I would not be able to see the updated Radio-options in my browser (Chroom) source code.
Hmmm I will continue to look for the error. I'm obviously doing something wrong  :'(
Thanks for now - I'll be back  ;)

/Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11298
    • View Profile
Re: NT5 need to update options on a type "Radio"
« Reply #5 on: April 13, 2012, 03:16:12 AM »
perhaps what you're returning is not valid xHtml?
if you're getting s response in firebug, click on the "xml" tab heading in the response to see if there's an error.

cheers
Bruce