gpt4 book ai didi

forms - 如何使用 Drupal 表单 API 制作后退按钮?

转载 作者:行者123 更新时间:2023-12-04 17:39:16 25 4
gpt4 key购买 nike

我需要这样做,但使用 Drupal 表单:

<input type="button" class="button-user" value="Back" onclick="location.href='edit'"/>

我尝试这样做,但没有用:
$form['back']['#prefix'] = "<input type='button' class='button-user' value='Back' onclick='location.href='edit''/>;

并且:
$form['back'] = array(
'#type' => 'button',
'#value' => 'Back',
'#attributes' => array(
'class' => 'button-user',
'onclick' => 'location.href=edit',
)
);

最佳答案

$form['back']['#markup'] = "<input type='button' class='button-user' value='Back' onclick='location.href=\'edit\''/>";

关于forms - 如何使用 Drupal 表单 API 制作后退按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8127846/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com