我正在尝试通过FPDM填写PDF表单,如下例所示:http://www.fpdf.org/en/script/script93.php
填写文本,日期,小数,...输入正常,但我无法找到如何检查复选框和分组复选框(单选按钮).这是两个问题:
true或或"true"或"1"或1或"checked"或"on"或"yes"不激活的复选框(大小写敏感测试太).我必须设置哪个值来激活复选框?"FPDF-Merge Error: field yourtype not found".什么是正确的名字?Adobe Acrobat Pro DC将名称"yourtype"显示为组中所有复选框的名称.在字段列表中,它将分组的复选框显示为"yourtype#0","yourtype#1","yourtype#2"等.但是脚本似乎无法找到任何此名称.没有运气,我也试过像"yourtype [1]"这样的东西.一旦我可以访问它们,我是否必须为其中一个设置值,或者直接分配(整数?)值?我的例子:
<?php
require('fpdm.php');
$fields = array(
'forname' => 'Jon Dow', // text input: works
'mycheck1' => true, // checkbox: doesn't work! Also tried "true", 1, "1", "yes", "on", ... (with case-sensitive)
'yourtype' => true, // grouped checkbox (radio button): doesn't even find input with that name.
); …Run Code Online (Sandbox Code Playgroud)