Skip Navigation

[Resolved] I need to create a custom field as hidden field

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by gnanasekaraL9305 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#603497

This is my form:
------------------------

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
<label>[wpml-string context="wpv-views"]Price[/wpml-string]</label>
<div id="price-slider"></div>
[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_min"]
[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_max"]
<input type="checkbox" value="10" > 0 - 10
<input type="checkbox" value="20" > 10 - 20
[wpv-filter-submit output="bootstrap"]
[wpv-form-view]
</div>
[wpv-filter-end]

I need to set below two fields as hidden field by default

[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_min"]
[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_max"]

Note: [wpv-control-postmeta type = 'hidden" field="wpcf-price" url_param="wpv-wpcf-price_min"] this is not working

#603585

Hi, could you just delete them? Anyway, if you want to include them but you want to hide them from your users, it's easiest to just wrap them in a hidden div like this:

<div style="display:none;">
  [wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_min"]
  [wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_max"]
</div>

They will still be present in the page source code, but they will not be shown.

#604009

Thanks Chritian, this is not the right way but any how my expectation is achieved thanks for your suggestion.