Open ssanders opened 10 years ago
Can you paste the calling code. Can you confirm the crawled page is valid markup.
$form = $crawler->filter('form')->form();
<input type="hidden" name="repairBidRelatedByAssetIdentifierList[0].selectWholeBidFlag" value="true">
I think this might be an issue in DomCrawler, not Goutte. However not sure on the use of . in the field name - from PHP manual
Note:
Dots and spaces in variable names are converted to underscores. For example <input name="a.b" /> becomes $_REQUEST["a_b"].
This seems to help:
$html = $crawler->html();
$html = str_replace('[', '%5B', $html);
$html = str_replace(']', '%5D', $html);
$crawler->clear();
$crawler->add($html);
i cannot submit form if name using this
$search['guestTypes[0].amount']='1';
always get error:
Malformed field path "guestTypes[0].amount" i try using:
$html = $crawler->html();
$html = str_replace('[', '%5B', $html);
$html = str_replace(']', '%5D', $html);
$crawler->clear();
$crawler->add($html);
but iam not lucky...
someone help me please...
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Malformed field path "repairBidRelatedByAssetIdentifierList[0].selectWholeBidFlag"' in phar:///mnt/web/public_html/lib/goutte/goutte.phar/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php:211 Stack trace: 0 phar:///mnt/web/public_html/lib/goutte/goutte.phar/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php(34): Symfony\Component\DomCrawler\FormFieldRegistry->getSegments('repairBidRelate...') 1 phar:///mnt/web/public_html/lib/goutte/goutte.phar/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php(279): Symfony\Component\DomCrawler\FormFieldRegistry->add(Object(Symfony\Component\DomCrawler\Field\InputFormField)) 2 phar:///mnt/web/public_html/lib/goutte/goutte.phar/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php(467): Symfony\Component\DomCrawler\Form->set(Object(Symfony\Component\DomCrawler\Field\InputFormField)) 3 phar:///mnt/web/public_html/lib/goutte/goutte.phar in phar:///mnt/web/public_html/lib/goutte/goutte.phar/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php on line 211