[Pro] Set a checkbox checked attribute

Is there any way I can set a checkbox checked attribute programmatically with PHP? For instance:

<?PHP if ($is_subscribed) echo "checked"; ?>

I want to somehow use that in my checkbox in Freeway Pro.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not in the bare application, no. I just tried several tricks that used to work, and they don’t. Please try my PHP Form Action, which might do what you need, although it forces a certain method of working (the post-back pattern).

Walter

On Jan 13, 2013, at 3:21 PM, Carlos Feliciano wrote:

Is there any way I can set a checkbox checked attribute programmatically with PHP? For instance:

<?PHP if ($is_subscribed) echo "checked"; ?>

I want to somehow use that in my checkbox in Freeway Pro.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There is one way you can do it. You need to place the checkbox inline, so draw an HTML item, double click inside it, then go to Insert>Checkbox. You’ll now be able to select the checkbox and open the Extended dialog (Command-Option-X). Enter the PHP into the Name field (use single quotes instead of doubles) and leave the Value field blank.

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I tried that, but it also output the =“” part:

<input type="checkbox" name="item3" <?php echo $checked; ?>=""/>

That’s with the PHP added in the Name field in an Extended attribute.

Walter

On Jan 13, 2013, at 5:35 PM, Joe Billings wrote:

There is one way you can do it. You need to place the checkbox inline, so draw an HTML item, double click inside it, then go to Insert>Checkbox. You’ll now be able to select the checkbox and open the Extended dialog (Command-Option-X). Enter the PHP into the Name field (use single quotes instead of doubles) and leave the Value field blank.

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

And if you put the code in the Value (the old FW3 work-around) then it doesn’t get output at all.

Walter

On Jan 13, 2013, at 6:44 PM, Walter Lee Davis wrote:

I tried that, but it also output the =“” part:

<input type=“checkbox” name=“item3” <?php echo $checked; ?>=“”/>

That’s with the PHP added in the Name field in an Extended attribute.

Walter

On Jan 13, 2013, at 5:35 PM, Joe Billings wrote:

There is one way you can do it. You need to place the checkbox inline, so draw an HTML item, double click inside it, then go to Insert>Checkbox. You’ll now be able to select the checkbox and open the Extended dialog (Command-Option-X). Enter the PHP into the Name field (use single quotes instead of doubles) and leave the Value field blank.

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not sure if this is what you are looking for but this is how I do it, but I set them using a mark up item myself:

<input type=checkbox name=“mycheckbox” value=“oranges” <?php if ($mycheckbox=='oranges') { echo 'checked'; } ?>>

HTH

On Jan 14, 2013, at 12:44 AM, Walter Lee Davis wrote:

I tried that, but it also output the =“” part:

<input type=“checkbox” name=“item3” <?php echo $checked; ?>=“”/>

That’s with the PHP added in the Name field in an Extended attribute.

Walter

On Jan 13, 2013, at 5:35 PM, Joe Billings wrote:

There is one way you can do it. You need to place the checkbox inline, so draw an HTML item, double click inside it, then go to Insert>Checkbox. You’ll now be able to select the checkbox and open the Extended dialog (Command-Option-X). Enter the PHP into the Name field (use single quotes instead of doubles) and leave the Value field blank.

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s an Action I just made to do this, also (optionally) adds the Rails-style hidden form field in front of the checkbox so you can use your checkbox to un-set things, too.

http://actionsforge.com/actions/view/285-checkboxhelper

Walter

On Jan 13, 2013, at 6:57 PM, Mike B wrote:

Not sure if this is what you are looking for but this is how I do it, but I set them using a mark up item myself:

<input type=checkbox name=“mycheckbox” value=“oranges” <?php if ($mycheckbox=='oranges') { echo 'checked'; } ?>>

HTH

On Jan 14, 2013, at 12:44 AM, Walter Lee Davis wrote:

I tried that, but it also output the =“” part:

<input type=“checkbox” name=“item3” <?php echo $checked; ?>=“”/>

That’s with the PHP added in the Name field in an Extended attribute.

Walter

On Jan 13, 2013, at 5:35 PM, Joe Billings wrote:

There is one way you can do it. You need to place the checkbox inline, so draw an HTML item, double click inside it, then go to Insert>Checkbox. You’ll now be able to select the checkbox and open the Extended dialog (Command-Option-X). Enter the PHP into the Name field (use single quotes instead of doubles) and leave the Value field blank.

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options