I've discovered some problems when using the po box and/or the placeholders option (labels as placeholder).
When po box is enabled certain fields like house number are no longer shown, yet the when the placeholders option is enabled it still does its thing adding placeholders on those not existing house number fields. This leaves incomplete webform components in the element array, which causes problems obviously.

Comments

pburg created an issue. See original summary.

paulvandenburg’s picture

Status: Active » Needs review
StatusFileSize
new4.09 KB

This patch restructures the logic so placeholder stuff is only done on elements that actually exist.
Additionally I've added an empty array to element_info_property() which is returned if no element info was found for the element type, so the += operation doesn't fail.

paulvandenburg’s picture

StatusFileSize
new10.6 KB

Tokens without replacement aren't cleared apparently for the default values. Picking that one up in this issue to not open an issue for every little thing.

Extracted the logic for calculating the default_value since those lines were already too long.
Added the 'clear' option to token_replace which is the only actual change in logic added on top of the above patch.

ralphvdhoudt’s picture

StatusFileSize
new10.89 KB

Better patch

ralphvdhoudt’s picture

StatusFileSize
new10.64 KB

Correct path

ralphvdhoudt’s picture

Status: Needs review » Fixed

Active for few months

  • ralphvdhoudt committed a712106 on 7.x-1.x
    Issue #2880269 by paulvandenburg, ralphvdhoudt: PO box with placeholders...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.