Jump to content

PS 1.7 - can't get data from checkbox and date


Recommended Posts

Hi all !

 

I'm coding my module for PS1.7 and from hookActionProductUpdate() I can get value from text field but not from checkbox or date field it's strange ...

 

The tpl file

...
	<div class="col-xl-2 col-lg-3">
		<div class="form-group">
			<label class="form-control-label">postcode</label>
			<div class="input-group">
				<input id="postcode" class="form-control" type="text" value="{$product.postcode}" name="postcode" maxlength="5">
			</div>
		</div>
	</div>
	<div class="col-xl-2 col-lg-3">
		<div class="form-group">
			<label class="form-control-label">other_info</label>
			<div class="input-group">
				<input id="other_info" class="form-control" type="checkbox" value="{$product.other_info}" name="other_info">
			</div>
		</div>
	</div>
        <div class="col-md-3">
            <fieldset class="form-group">
                <label class="form-control-label">date</label>
                <div class="input-group datepicker">
                    <input id="date" class="form-control" type="text" value="{$product.date}" placeholder="YYYY-MM-DD" name="date">
                    <div class="input-group-addon" style="">
                        <i class="material-icons">date_range</i>
                    </div>
                </div>
            </fieldset>
        </div>
...

The module php file

	
	public function hookActionProductUpdate()
	{

            var_dump(Tools::getAllValues());
	
	}

I see in log : ["postcode"]=> string(5) "12345" and nothing else

Edited by fred04 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...