hodakaの居場所

  • カテゴリ モジュール の最新配信
  • RSS
  • RDF
  • ATOM

XOOPSTips集 - フォームメールをinquiryspに変更

フォームメールをinquiryspに変更

カテゴリ : 
モジュール
執筆 : 
hodaka 2006/1/5 16:41

ホダ塾で勉強を兼ねてinquiryspのオールcss化に挑戦してみた。

このモジュールの素晴らしい点はいくつもあるが、なかでもお気に入りはディレクトリ名が自由に決められること。ちなみに、当サイトではcontactusである。
また、最新のv0.50を入れてみると分かるのだが、従来のint、text、textareaに加えてoption、arrayが加わったので、まずは殆どのフォームに対応できるようになったことも朗報。さらに、必要なオプションがあれば、約束にしたがった関数を書けばいいだけともなり、xoopsFormを使うのでhtmlソースがキレイとはいえないformmail、liaiseモジュールのお世話になることもない。

テンプレートサンプルがついてるので迷うこともないだろうが、arrayを使ったコードのsmarty版を参考までに披露しておこう。
この方法は、既にフォームに設定したものをテンプレートでまたまたいちいち書かねばならないという「美しく」ないのを避けるためでもある。$viewが$xoopsTplのラッパーみたいになってるのがミソ。

templates/inquiry_form_0.html

phpスクリプト内に:
global $view;  // 追加
/* * フォームの設定 * */
$inqtmp['inquiries'] = array('ご請求資料','array','1',array('会社案内','採用応募資料','製品カタログ','会社見学申込書'));
$view->assign_by_ref('inquiries_title', $inqtmp['inquiries'][0]);
$view->assign_by_ref('inquiries', $inqtmp['inquiries'][3]);
(中略)
html文内に:
<fieldset>
<span class="label"><{$inquiries_title}></span>
<{foreach item=inq from=$inquiries key=key}>
<span class="control">
<input class="checkbox" id="inquiries<{$key}>" name="inqv[inquiries][]" type="checkbox" value="<{$key}>"<{if $inquiries[$key]==1}> checked="checked"<{/if}> /><label for="inquiries<{$key}>"><{$inq}></label>
</span>
<{/foreach}>
</fieldset>

[2006.10.4追加]今度はタイプoptionのものをおまけに紹介。

$prefs = array('北海道','青森県','岩手県','宮城県','秋田県','山形県','福島県','栃木県','群馬県','茨城県','埼玉県','千葉県','東京都','神奈川県','山梨県','長野県','新潟県','富山県','石川県','福井県','静岡県','愛知県','岐阜県','三重県','滋賀県','京都府','奈良県','大阪府','兵庫県','岡山県','広島県','山口県','鳥取県','島根県','徳島県','香川県','愛媛県','高知県','福岡県','大分県','佐賀県','長崎県','熊本県','宮崎県','鹿児島県','沖縄県');
$inqtmp['pref'] = array('都道府県','option','1',$prefs);
$view->assign_by_ref('prefs_title', $inqtmp['pref'][0]);
$view->assign_by_ref('prefs', $prefs);
.........
<fieldset>
<span class="label"><{$prefs_title}></span>
<span class="control">
<select id="pref" name="inqv[pref]">
<{foreach item=pref from=$prefs key=key}>
<option id="pref<{$key}>" value="<{$key}>"<{if $prefs[$key]==1}> selected="selected"<{/if}> /><{$pref}></option>
<{/foreach}>
</select>
</span>
</fieldset>

トラックバック

トラックバックpingアドレス https://www.kuri3.net/modules/xoopstips/tb.php/51
参照元
michael kors lommebok2015/9/7 3:44
st R <a href="http://michaelkorsveskesalglommebok.tumblr.com/" target="_blank">michael kors veske salg</a> OSA promotion and s <a href="http://www.guidancer.biz/mk/michael-kors-salg-hoyer...5077de.html" target="_blank">michael kors salg</a> alary raise, now also a lot of light. "But the manager, how do you know them?" The tall girls still have doubts, "you are not be suspicious, mistaken?" "How will <a href="http://www.mdskintherapy.biz/mk/michael-kors-salg-harry...4d60a3.html" target="_blank">michael kors salg</a&......more
2015'michael kors lommebok ... rnehufcxendfyqez
michael kors handbags2015/9/7 3:43
quot;http://salgmichaelkorsveske.tumblr.com/" target="_blank">michael kors norge</a> icable unusually high strength body, the dark clouds in <a href="http://www.guidancer.biz/mk/michael-kors-veske-hoyer-pris...a7f29e.html" target="_blank">michael kors veske høyer</a> the sky and the rampant golden lightning, I was attracted by her strength and. This is...... Dixian above what ah! Wang Yan an <a href="http://www.themodernmaven.biz/mk/michael-kors-veske-hoyer-harry...8ba4fb.html" target="_blank">michael kors veske høyer</a>......more
2015'michael kors jet set ... jqrgvraygogcydrw
2015 michael kors veske2015/9/2 15:17
http://michaelkorsselmaveske.tumblr.com/" target="_blank">michael kors veske</a> ...... Oh, sister, not with you together is not happy,michael <a href="http://michaelkorsveskenorgeselma.tumblr.com/" target="_blank">michael kors veske tote</a> kors veske, but and his men together, have the feeling of being in love, that is what also can not be replaced." Qiu Zhen did <a href="http://damemichaelkorsveske.tumblr.com/" target="_blank">michael kors veske</a&......more
2015'michael kors jet set ... tobqpriwpnssveyo
2015 michael kors2015/9/2 1:41
ichaelkorshandbagsjetset.tumblr.com/"" rel="external">http://michaelkorshandbagsjetset.tumblr.com/" target="_blank">michael kors handbags</a> , full of incense <a href="http://2015michaelkorsvesker.tumblr.com/" target="_blank">2015 michael kors</a> to sober up, first is coy cross my one eye, then look to the surrounding scenery, feels excited. Our landing place is a vast expanse of whiteness of the prairie, said it was white, is because now <a href="http://michaelkorsoslohamilton.tumblr.com/" target="_blank">michael kors hamilton</a>......more
2015'michael kors norge ... pbdzgwezsryakelu
michael kors salg2015/9/2 1:41
baby <a href="http://salgmichaelkorsveske.tumblr.com/" target="_blank">michael kors norge</a> bag once <a href="http://michaelkorshandbagsjetset.tumblr.com/" target="_blank">michael kors handbags</a> again summoned the hundreds of pieces of diamond rings, neatly placed on the stone table top, shone all around is a shining light. Rao is Kournikova not lust fi <a href="http://michaelkorsoslohamilton.tumblr.com/" target="_blank">michael kors hamilton</a>......more
2015'michael kors oslo ... hkudcltfpsoxrpuq
michael kors norge2015/9/2 1:40
lton.tumblr.com/"" rel="external">http://michaelkorsoslohamilton.tumblr.com/" target="_blank">michael kors hamilton</a> r <a href="http://salgmichaelkorsveske.tumblr.com/" target="_blank">michael kors norge</a> aise, full of incense in a while Zhang Jiaoye remained calm, but in the eyes of smile is deceived people. "But the flower brothers, what you said is not life threatening, are <a href="http://michaelkorshandbagsjetset.tumblr.com/" target="_blank">michael kors handbags</a> you kidding me? In this mundane world,michael kor......more
2015'michael kors veske ... wxkiifgmwxvpbdfz
michael kors salg2015/9/2 1:40
slovesker.tumblr.com/"" rel="external">http://michaelkorsoslovesker.tumblr.com/" target="_blank">michael kors vesker</a> It doesn't matter completely." She <a href="http://2015michaelkorsvesker.tumblr.com/" target="_blank">2015 michael kors</a> said. I also laugh together. "On the. Brother head stupid. Chenchen. Then where is your slaughter knife?" Feng Chen gave me a look. "Brother. If slaughter knife is not in the <a href="http://michaelkorsoslovesker.tumblr.com/" target="_blank">michael kors oslo</a> ha......more
2015'michael kors vesker ... jzeyqcaudjnqpfkd
michael kors oslo2015/9/2 1:39
ven hi <a href="http://billigmichaelkorsveskenorge.tumblr.com/" target="_blank">2015 michael kors veske</a> s minions also allow me to move?" A vigoro <a href="http://michaelkorsoslovesker.tumblr.com/" target="_blank">michael kors klokker</a> us voice said: "Her Majesty the queen has misunderstood, not our intent to protect him. But small fathers managed to cultivate a helper <a href="http://michaelkorslommebokoslo.tumblr.com/" target="_blank">michael kors tote</a>......more
2015'michael kors vesker ... boxnwgsfhskchcrt
michael kors lommebok2015/9/2 1:38
t;" rel="external">http://michaelkorslommeboknorge.tumblr.com/" target="_blank">michael kors salg</a> ttle girl only ten years old, height of about one hundred and twenty centime <a href="http://michaelkorshandbagsveske.tumblr.com/" target="_blank">michael kors lommebok</a> ters, pretty much like the most beautiful doll like, between the prospect and the boss, Kuraki Maki have some simil <a href="http://salgmichaelkorsveske.tumblr.com/" target="_blank">michael kors veske</a> ar. When I looked at the girl, turning a pair of b......more
2015'michael kors lommebok ... ypabhzzlgzlhqfyx
2015 michael kors2015/9/2 1:38
/michaelkorsveskesalglommebok.tumblr.com/"" rel="external">http://michaelkorsveskesalglommebok.tumblr.com/" target="_blank">michael kors veske salg</a> ron bow cle <a href="http://2015michaelkorssalg.tumblr.com/" target="_blank">2015 michael kors</a> nched his fists, his words caused a great deal of clansman agree, opposite Korea demon although hateful, but young people not only to kill them, but also crumbled their soul, direct let them die, the w <a href="http://2015michaelkorsvesker.tumblr.com/" target="_blank">michael kors dame</a>......more
2015'michael kors salg ... vhynfsqjfxnhiohj
michael kors oslo2015/9/2 1:37
elkorsveskesalglommebok.tumblr.com/"" rel="external">http://michaelkorsveskesalglommebok.tumblr.com/" target="_blank">michael kors veske lommebok</a> Chi Dan", plus the true yuan my guide potency scattered, she hit the blockage of <a href="http://michaelkorsoslohamilton.tumblr.com/" target="_blank">michael kors hamilton</a> the meridians with fast recovery. The twinkling of an eye can open your eyes, just to see the opposite Iraq Lisa et al. Strange sce <a href="http://damemichaelkorsveske.tumblr.com/" target="_blank">michael kors veske</a>......more
2015'michael kors lommebok ... cnkcpmdhdtuxddbb
michael kors veske tote2015/9/2 1:36
ref="http://michaelkorshandbagsjetset.tumblr.com/" target="_blank">2015 michael kors</a> many can support one day, will lose the soul." Yuantong mast <a href="http://michaelkorsoslovesker.tumblr.com/" target="_blank">michael kors vesker</a> er replied, "but this is only a temporary solution, no matter how her vitality, can arouse her own vitality." "As we go to brea <a href="http://damemichaelkorssalg.tumblr.com/" target="_blank">michael kors veske</a>......more
2015'michael kors tote ... hzvcaahenwhnojsj
michael kors oslo2015/9/2 1:36
rssalg.tumblr.com/"" rel="external">http://2015michaelkorssalg.tumblr.com/" target="_blank">michael kors vesker</a> know?" The prince of silence for a long time, unconsciously sigh <a href="http://billigmichaelkorsveskenorge.tumblr.com/" target="_blank">2015 michael kors veske</a> a way. "Your Highness, we group twelve years will also not to, they might also ashamed to tell the record unbearable here, so......" Diego Duke up <a href="http://michaelkorslommebokoslo.tumblr.com/" target="_blank">michael kors lommebok</a> explai......more
2015'2015 michael kors veske ... qeqmxbwfxkxdgdfz
michael kors norge2015/9/2 1:35
" rel="external">http://billigmichaelkorsveskenorge.tumblr.com/" target="_blank">2015 michael kors veske</a> n fact, Futian group family is very large, only members of Congre <a href="http://2015michaelkorsvesker.tumblr.com/" target="_blank">michael kors vesker</a> ss, there are as many as three people, plus the person they control in Congress "Fukuda faction", at least in parliament has thirty-eight seats, be who also dare not ignore for <a href="http://2015michaelkorssalg.tumblr.com/" target="_blank">michael kors vesker</a> ce. O......more
2015'michael kors veske ... qnezuzjileinryfv
michael kors veske2015/9/2 1:34
s <a href="http://michaelkorsveskesalglommebok.tumblr.com/" target="_blank">michael kors veske norge</a> ed of stunning beauty, <a href="http://michaelkorslommebokoslo.tumblr.com/" target="_blank">michael kors lommebok</a> also could not help but was furious, a take a knife and rushed the bloodlust. "There is a simple way we can know who he is." Here, I deliberately paus <a href="http://norgemichaelkorsselma.tumblr.com/" target="_blank">michael kors selma</a>......more
2015'michael kors veske ... msoejdpqhmqpxpxe
michael kors veske tote2015/9/2 1:34
t;" rel="external">http://oslomichaelkorsnorge.tumblr.com/" target="_blank">michael kors oslo</a> p zhengmou o <a href="http://michaelkorslommeboknorge.tumblr.com/" target="_blank">michael kors salg</a> ut. These guys off the government invited guest, out of the government's reputation. Is a great influence on the diplomatic front, it is adverse, Na very!" A red little <a href="http://michaelkorslommeboknorge.tumblr.com/" target="_blank">michael kors lommebok</a> monk face, just talking to a "Amitabha", did not answer.......more
2015'michael kors lommebok ... dbueqokfogimdlpc
CASIO2013/6/7 11:36
にありがとうございます。私は間違いなく、非常に長い時間を取得するために、メッセージのこれらのタイプを探してきました。ありがと......more
CASIO
SEIKO2013/6/7 11:36
、私はそれが私が探していたものだけではなかったにも関わらず、止めることができなかったこのブログの記事を見つけました、しかしまだ読んでよかったです。私は即座にすべての更新の連絡を取り合うために、あなたのブログのフィードを取得しま......more
SEIKO
カシオ腕時計2013/6/7 11:35
にありがとうございます。私は間違いなく、非常に長い時間を取得するために、メッセージのこれらのタイプを探してきました。ありがと......more
カシオ腕時計

ログイン


ユーザー名:


パスワード:





パスワード紛失