Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PHP version) Checkbox unable to set default "checked" (Fixed by my own) #6

Open
sospixs opened this issue Nov 20, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@sospixs
Copy link

sospixs commented Nov 20, 2014

Example

$form1->addCheckboxField('ckb_flag','Label',true);

I've found why that not working. That because in razorflow.wrapper.min.js
options.value is not pass correct value from setting. Value always show 'undefined'
(null==(__t=options.value===!0?"checked":"")?"":__t)

I've fixed on my own way.

  1. Edit FormComponent.php by chage array property name from 'value' to another and this is my code
    +$opts['options'] = array('isCheck'=>$value); // New code added.
    -$opts['options'] = array('value'=>$value); // The original code.

2 Edit razorflow.wrapper.min.js
+(null==(__t=options.isCheck===!0?"checked":"")?"":__t) // New code edited.
-(null==(__t=options.value===!0?"checked":"")?"":__t) // Original code

And that work fine. I'm not sure this problem was issue on javascript version or not?

@sospixs sospixs changed the title (PHP version) checkbox unable to set default "checked" (PHP version) Checkbox unable to set default "checked" Nov 20, 2014
@sospixs sospixs changed the title (PHP version) Checkbox unable to set default "checked" (PHP version) Checkbox unable to set default "checked" (Fixed by my own) Nov 20, 2014
@skyronic
Copy link
Member

Awesome! We'll have this patched up shortly! Thank you for the update.

I'll write contributor guidelines and documentation on how to fix and verify issues, and send us pull requests in a few days.

@skyronic skyronic self-assigned this Nov 27, 2014
@skyronic skyronic added the bug label Nov 27, 2014
@skyronic skyronic added this to the 1.0.15 milestone Nov 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants