Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Since the issue was with serialization of the form elements my solution was to override the __sleep method on the Select class to include the options.

    Now I think about it, the better solution is to add this to the OptionElement class in PFBC/OptionElement.php:

    public function __sleep() {
    	$fields = parent::__sleep();
    	array_push($fields, "options");
    	return $fields;
    }

    More than happy to get credits if you use this 🙂

    Tom

    Having just gone at this for several hours for a client I can confirm that you’re not the only one with this problem.

    The issue is that the plugin doesn’t properly serialize some option element subclasses, so that when the form is stored in the session the available options for a drop-down aren’t saved with it.

    This issue will only appear if ajax submission breaks or is disabled for some reason.

    If there is a repo I can commit my “fix” to I will gladly provide you (and indeed Cimatti) with updated code that works around at least this specific case. I’ve not taken the time yet to see if other form elements might also succumb to this issue.

Viewing 2 replies - 1 through 2 (of 2 total)